stub

package
v0.0.0-...-bd2d25b Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Address of grpc server, i.e. 10.10.10.10:234434
	Address string

	// IsTLSEnabled if true then authentication to server needed with cert.
	IsTLSEnabled bool

	// WaitConnectionReady wait till connection ready. Blocking.
	// If true then will block for as long as the ConnectionTimeOut.
	WaitConnectionReady bool

	// MaxRetry if WaitConnectionReady is true then will be ignored.
	// if WaitConnectionReady is false then will be used in background for retrying mechanism.
	MaxRetry int

	// ConnectionTimeOut(seconds) If WaitConnectionReady is true then will be used as time to wait till connected.
	// if WaitConnectionReady is false then will be used as time to wait in WaitForStateChange while retrying.
	// Default is 5 seconds
	ConnectionTimeOut int
}

type Stub

type Stub struct {
	// contains filtered or unexported fields
}

func New

func New(o *Options) (*Stub, error)

func (*Stub) ClientConn

func (s *Stub) ClientConn() *_grpc.ClientConn

func (*Stub) Close

func (s *Stub) Close() error

func (*Stub) IsClientReady

func (s *Stub) IsClientReady() bool

func (*Stub) ServerAddress

func (s *Stub) ServerAddress() string

Jump to

Keyboard shortcuts

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