Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) DefaultConfig() string
- func (c *Client) Description() string
- func (c *Client) GetConnectedClient() interface{}
- func (c *Client) Name() string
- func (c *Client) Prepare() error
- func (c *Client) RegisterListener(listener chan<- api.ClientStatus)
- func (c *Client) Start() error
Constants ¶
View Source
const Name = "grpc-client"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
config.CommonFields
// config
ServerAddr string `mapstructure:"server_addr"` // The gRPC server address
EnableTLS bool `mapstructure:"enable_TLS"` // Enable TLS connect to server
ClientPemPath string `mapstructure:"client_pem_path"` // The file path of client.pem. The config only works when opening the TLS switch.
ClientKeyPath string `mapstructure:"client_key_path"` // The file path of client.key. The config only works when opening the TLS switch.
CaPemPath string `mapstructure:"ca_pem_path"` // The file path oca.pem. The config only works when opening the TLS switch.
InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"` // Controls whether a client verifies the server's certificate chain and host name.
Authentication string `mapstructure:"authentication"` // The auth value when send request
CheckPeriod int `mapstructure:"check_period"` // How frequently to check the connection
// contains filtered or unexported fields
}
func (*Client) DefaultConfig ¶
func (*Client) Description ¶
func (*Client) GetConnectedClient ¶
func (c *Client) GetConnectedClient() interface{}
func (*Client) RegisterListener ¶
func (c *Client) RegisterListener(listener chan<- api.ClientStatus)
Click to show internal directories.
Click to hide internal directories.