Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetConnection ¶
func (c *Client) GetConnection() grpc.ClientConnInterface
func (*Client) GetConnectionStatus ¶
func (c *Client) GetConnectionStatus() ConnectionStatus
func (*Client) RegisterListener ¶
func (c *Client) RegisterListener() chan<- ConnectionStatus
type Config ¶
type Config struct { Addr string `mapstructure:"addr"` // Server address // TLS settings 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) }
type Operator ¶
type Operator interface { // GetConnection of rover to backend server GetConnection() grpc.ClientConnInterface // GetConnectionStatus of connection GetConnectionStatus() ConnectionStatus // RegisterListener of connection status change RegisterListener() chan<- ConnectionStatus }
Click to show internal directories.
Click to hide internal directories.