Skip to content

Commit

Permalink
fix: export the argument of the TSCreateRuleWithArgs
Browse files Browse the repository at this point in the history
Signed-off-by: Rueian <rueiancsie@gmail.com>
  • Loading branch information
rueian committed Aug 20, 2024
1 parent afe479c commit fced78b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rueidiscompat/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3855,7 +3855,7 @@ func (c *Compat) TSCreateRule(ctx context.Context, sourceKey string, destKey str

// TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option.
// This function allows for specifying additional option such as:
// alignTimestamp.
// AlignTimestamp.
// For more information - https://redis.io/commands/ts.createrule/
func (c *Compat) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd {
_cmd := c.client.B().TsCreaterule().Sourcekey(sourceKey).Destkey(destKey)
Expand Down Expand Up @@ -3888,8 +3888,8 @@ func (c *Compat) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, des
case Twa:
duration = _cmd.AggregationTwa().Bucketduration(int64(bucketDuration))
}
if options != nil && options.alignTimestamp != 0 {
duration.Aligntimestamp(options.alignTimestamp)
if options != nil && options.AlignTimestamp != 0 {
duration.Aligntimestamp(options.AlignTimestamp)
}
cmd := duration.Build()
return newStatusCmd(c.client.Do(ctx, cmd))
Expand Down
2 changes: 1 addition & 1 deletion rueidiscompat/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2893,7 +2893,7 @@ type TSAlterOptions struct {
}

type TSCreateRuleOptions struct {
alignTimestamp int64
AlignTimestamp int64
}

type TSGetOptions struct {
Expand Down

0 comments on commit fced78b

Please sign in to comment.