grpc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name     = "grpc-client"
	ShowName = "GRPC Client"
)

Variables

This section is empty.

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) 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) ShowName added in v0.4.0

func (c *Client) ShowName() string

func (*Client) Start

func (c *Client) Start() error

type TimeoutConfig added in v1.2.0

type TimeoutConfig struct {
	Unary  string `mapstructure:"unary"`  // The timeout for unary single request
	Stream string `mapstructure:"stream"` // The timeout for unary stream request
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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