Documentation
¶
Index ¶
- type ClientFlags
- func (c *ClientFlags) AddFlags(cmd *cobra.Command)
- func (c *ClientFlags) GetCredential() *security.Credential
- func (c *ClientFlags) GetLogLevel() string
- func (c *ClientFlags) GetPdAddr() string
- func (c *ClientFlags) ToGRPCDialOption() (grpc.DialOption, error)
- func (c *ClientFlags) ToTLSConfig() (*tls.Config, error)
- func (c *ClientFlags) Validate() error
- type ClientGetter
- type Factory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFlags ¶
type ClientFlags struct {
// contains filtered or unexported fields
}
ClientFlags specifies the parameters needed to construct the client.
func (*ClientFlags) AddFlags ¶
func (c *ClientFlags) AddFlags(cmd *cobra.Command)
AddFlags receives a *cobra.Command reference and binds flags related to template printing to it.
func (*ClientFlags) GetCredential ¶
func (c *ClientFlags) GetCredential() *security.Credential
GetCredential returns credential.
func (*ClientFlags) GetLogLevel ¶
func (c *ClientFlags) GetLogLevel() string
GetLogLevel returns log level.
func (*ClientFlags) GetPdAddr ¶
func (c *ClientFlags) GetPdAddr() string
GetPdAddr returns pd address.
func (*ClientFlags) ToGRPCDialOption ¶
func (c *ClientFlags) ToGRPCDialOption() (grpc.DialOption, error)
ToGRPCDialOption returns the option of GRPC dial.
func (*ClientFlags) ToTLSConfig ¶
func (c *ClientFlags) ToTLSConfig() (*tls.Config, error)
ToTLSConfig returns the configuration of tls.
func (*ClientFlags) Validate ¶
func (c *ClientFlags) Validate() error
Validate makes sure provided values for ClientFlags are valid.
type ClientGetter ¶
type ClientGetter interface { ToTLSConfig() (*tls.Config, error) ToGRPCDialOption() (grpc.DialOption, error) GetPdAddr() string GetLogLevel() string GetCredential() *security.Credential }
ClientGetter defines the client getter.
type Factory ¶
type Factory interface { ClientGetter EtcdClient() (*etcd.CDCEtcdClient, error) PdClient() (pd.Client, error) }
Factory defines the client-side construction factory.
func NewFactory ¶
func NewFactory(clientGetter ClientGetter) Factory
NewFactory creates a client build factory.
Click to show internal directories.
Click to hide internal directories.