func (c *Configuration) NewClient(
	kvClient m3clusterclient.Client,
	clockOpts clock.Options,
	instrumentOpts instrument.Options,
) (Client, error) {
	opts, err := c.newClientOptions(kvClient, clockOpts, instrumentOpts)
	if err != nil {
		return nil, err
	}
	return NewClient(opts), nil
}
NewClient creates a new client.
package client
import (
	"time"
	"github.com/m3db/m3aggregator/sharding"
	m3clusterclient "github.com/m3db/m3cluster/client"
	"github.com/m3db/m3cluster/kv"
	"github.com/m3db/m3cluster/placement"
	"github.com/m3db/m3metrics/encoding/protobuf"
	"github.com/m3db/m3x/clock"
	"github.com/m3db/m3x/instrument"
	"github.com/m3db/m3x/pool"
	"github.com/m3db/m3x/retry"
	"github.com/uber-go/tally"
)
type Configuration struct {
	PlacementKV                kv.OverrideConfiguration       `yaml:"placementKV" validate:"nonzero"`
	PlacementWatcher           placement.WatcherConfiguration `yaml:"placementWatcher"`
	HashType                   *sharding.HashType             `yaml:"hashType"`
	ShardCutoverWarmupDuration *time.Duration                 `yaml:"shardCutoverWarmupDuration"`
	ShardCutoffLingerDuration  *time.Duration                 `yaml:"shardCutoffLingerDuration"`
	Encoder                    EncoderConfiguration           `yaml:"encoder"`
	FlushSize                  int                            `yaml:"flushSize"`
	MaxTimerBatchSize          int                            `yaml:"maxTimerBatchSize"`
	QueueSize                  int                            `yaml:"queueSize"`
	QueueDropType              *DropType                      `yaml:"queueDropType"`
	Connection                 ConnectionConfiguration        `yaml:"connection"`
}
func (c *Configuration) NewAdminClient(
	kvClient m3clusterclient.Client,
	clockOpts clock.Options,
	instrumentOpts instrument.Options,
) (AdminClient, error) {
	client, err := c.NewClient(kvClient, clockOpts, instrumentOpts)
	if err != nil {
		return nil, err
	}
	return client.(AdminClient), nil
}