grpc

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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) Close

func (c *Client) Close() error

func (*Client) DefaultConfig

func (c *Client) DefaultConfig() string

func (*Client) Description

func (c *Client) Description() string

func (*Client) GetConnectedClient

func (c *Client) GetConnectedClient() interface{}

func (*Client) Name

func (c *Client) Name() string

func (*Client) Prepare

func (c *Client) Prepare() error

func (*Client) RegisterListener

func (c *Client) RegisterListener(listener chan<- api.ClientStatus)

func (*Client) Start

func (c *Client) Start() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL