Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionPool ¶
type ConnectionPool interface { io.Closer Client() (*Transport, error) Detect(ctx context.Context, req *protocol.Request) (*protocol.Response, error) }
ConnectionPool provides function to work with client connections
func NewLazyTransportPool ¶
func NewLazyTransportPool(ctx context.Context, poolSize int, grpcAddress string, connTimeout time.Duration, options ...Option) ConnectionPool
NewLazyTransportPool provides connection pool to the service
type Option ¶
type Option func(*Options)
Option configuration type
func WithTransportCredentials ¶
WithTransportCredentials inits secure certificates
type Options ¶
type Options struct { // Secure connections Secure bool // GRPCAddress contains HOST:PORT or IP:PORT to connecto to Pagecache GRPC server GRPCAddress string // Connect Certificates .pem, .crt CrtFile string KeyFile string RootCrtFile string ServerName string }
Options of the client connect
func (*Options) TransportCredentials ¶
func (opt *Options) TransportCredentials() (credentials.TransportCredentials, error)
TransportCredentials init GRPC transport credentionals
type Transport ¶
type Transport struct { protocol.DetectorClient // contains filtered or unexported fields }
func NewTransport ¶
NewTransport connector pool
Click to show internal directories.
Click to hide internal directories.