Documentation
¶
Index ¶
- Constants
- Variables
- 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) ShowName() string
- func (c *Client) Start() error
- type TimeoutConfig
Constants ¶
View Source
const ( Name = "grpc-client" ShowName = "GRPC Client" )
Variables ¶
View Source
var CtxBidirectionalStreamKey = ctxKey{}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
config.CommonFields
// server finder config
ServerFinderConfig resolvers.ServerFinderConfig `mapstructure:",squash"`
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(second)
Timeout TimeoutConfig `mapstructure:"timeout"` // The gRPC send request timeout
// 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)
type TimeoutConfig ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.