grpc

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMaxMsgSize define maximum message size that server can send or receive.
	// Default value is 4MB.
	DefaultMaxMsgSize = 1024 * 1024 * 4

	DefaultSleepAfterDeRegister = time.Second * 2

	// DefaultRegisterTTL The register expiry time
	DefaultRegisterTTL = time.Minute

	// DefaultRegisterInterval The interval on which to register
	DefaultRegisterInterval = time.Second * 30

	DefaultSleepAfterDeregister = time.Second * 2
)
View Source
const Name = "grpc_entry"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Grpc                 *grpcs.Cfg    `json:"grpc"`
	Gw                   *grpcGw.Cfg   `json:"gw"`
	Address              string        `json:"address"`
	Advertise            string        `json:"advertise"`
	RegisterTTL          time.Duration `json:"register_ttl"`
	RegisterInterval     time.Duration `json:"register_interval"`
	SleepAfterDeRegister time.Duration `json:"sleepAfterDeRegister"`
	// contains filtered or unexported fields
}

type Entry

type Entry interface {
	entry.Entry
	Plugin(plugins ...plugin.Plugin)
	Register(handler interface{}, opts ...Opt)
	UnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor)
	StreamInterceptor(interceptors ...grpc.StreamServerInterceptor)
}

func New

func New(name string) Entry

type Opt

type Opt func(opts *options)

Jump to

Keyboard shortcuts

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