stubext

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnHealthyUpStream = errors.New("grpc response body is no healthy upstream")
)

Functions

This section is empty.

Types

type NewClientFunc

type NewClientFunc (func(*grpc.ClientConn) interface{})

type StubExt

type StubExt struct {
	NS             string
	DialOptions    []grpc.DialOption
	NewClientFuncs map[string]NewClientFunc
	RetryCodes     []codes.Code

	Host         string
	Port         uint16
	ConnTimeout  time.Duration
	CallTimeout  time.Duration
	RetryBackoff time.Duration
	RetryTimes   uint
	Authority    string
	Metadata     map[string]string
	Mocked       bool

	Clients map[string]interface{}
	// contains filtered or unexported fields
}

func (*StubExt) Application

func (d *StubExt) Application() *gobay.Application

func (*StubExt) Close

func (d *StubExt) Close() error

func (*StubExt) GetConn

func (d *StubExt) GetConn(userOpts ...grpc.DialOption) (*grpc.ClientConn, error)

func (*StubExt) GetCtx

func (d *StubExt) GetCtx(ctx context.Context) context.Context

func (*StubExt) Init

func (d *StubExt) Init(app *gobay.Application) error

func (*StubExt) Object

func (d *StubExt) Object() interface{}

Jump to

Keyboard shortcuts

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