Documentation ¶
Overview ¶
Package grpc provides basic gRPC functions.
Package grpc provides basic gRPC functions.
Package grpc provides basic gRPC functions.
Package grpc provides basic gRPC functions.
Package grpc provides basic gRPC functions.
Index ¶
- type Client
- func (c *Client) AddImport(path ...string)
- func (c *Client) AddProtobuf(path ...string)
- func (c *Client) CancelQuery()
- func (c *Client) Close()
- func (c *Client) CloseStream()
- func (c *Client) Connect(addr string, opts ...ClientOpt) error
- func (c *Client) GetResponseChannel() chan *entity.QueryResponse
- func (c *Client) GetSentCounter() uint
- func (c *Client) LoadFromProtobuf() ([]*entity.Service, []*entity.ProtobufError, *entity.ProtobufError)
- func (c *Client) LoadFromReflection() ([]*entity.Service, error)
- func (c *Client) Query(method *entity.Method, data map[string]interface{}, metadata []string)
- func (c *Client) SetSettings(cfg *entity.Settings)
- type ClientOpt
- type ClientOptions
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
}
Client object capable of interacting with Client
func (*Client) AddProtobuf ¶
AddProtobuf adds protobuf files
func (*Client) CancelQuery ¶
func (c *Client) CancelQuery()
CancelQuery aborting a running gRPC request
func (*Client) CloseStream ¶ added in v0.3.14
func (c *Client) CloseStream()
CloseStream stops a running gRPC stream
func (*Client) GetResponseChannel ¶ added in v0.3.14
func (c *Client) GetResponseChannel() chan *entity.QueryResponse
GetResponseChannel returns response channel
func (*Client) GetSentCounter ¶ added in v0.3.14
GetSentCounter returns sent messages counter
func (*Client) LoadFromProtobuf ¶
func (c *Client) LoadFromProtobuf() ([]*entity.Service, []*entity.ProtobufError, *entity.ProtobufError)
LoadFromProtobuf loads services from protobuf
func (*Client) LoadFromReflection ¶
LoadFromReflection loads services using reflection
func (*Client) SetSettings ¶ added in v0.3.14
SetSettings sets application settings
type ClientOpt ¶
type ClientOpt func(options *ClientOptions)
func WithClientCertificate ¶
WithClientCertificate returns ClientOpt which sets client certificate
func WithClientKey ¶
WithClientKey returns ClientOpt which sets client certificate private key
func WithInsecure ¶
func WithInsecure() ClientOpt
WithInsecure returns ClientOpt which disables server certificate chain verification and hostname
func WithNoTLS ¶
func WithNoTLS() ClientOpt
WithNoTLS returns ClientOpt which disables transport security
func WithRootCertificate ¶
WithRootCertificate returns ClientOpt which sets server CA certificate
type ClientOptions ¶
type ClientOptions struct {
// contains filtered or unexported fields
}
ClientOptions represents Client options