Skip to content

Commit

Permalink
Export function NewClientOptions (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaan420 authored Nov 13, 2023
1 parent d4b0fe7 commit b851b14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/aggregator/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (c *Configuration) NewClient(
instrumentOpts instrument.Options,
rwOpts xio.Options,
) (Client, error) {
opts, err := c.newClientOptions(kvClient, clockOpts, instrumentOpts, rwOpts)
opts, err := c.NewClientOptions(kvClient, clockOpts, instrumentOpts, rwOpts)
if err != nil {
return nil, err
}
Expand All @@ -96,7 +96,9 @@ var (
errLegacyClientNoWatcherConfig = errors.New("no placement watcher config set")
)

func (c *Configuration) newClientOptions(
// NewClientOptions creates Options that can be used to
// create a New Aggregator Client.
func (c *Configuration) NewClientOptions(
kvClient m3clusterclient.Client,
clockOpts clock.Options,
instrumentOpts instrument.Options,
Expand Down
2 changes: 1 addition & 1 deletion src/aggregator/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestNewClientOptions(t *testing.T) {
clockOpts := clock.NewOptions()
instrumentOpts := instrument.NewOptions()
rwOpts := xio.NewOptions()
opts, err := cfg.newClientOptions(kvClient, clockOpts, instrumentOpts, rwOpts)
opts, err := cfg.NewClientOptions(kvClient, clockOpts, instrumentOpts, rwOpts)
require.NoError(t, err)

// Verify the constructed options match expectations.
Expand Down

0 comments on commit b851b14

Please sign in to comment.