grpcservice

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Dial(ctx context.Context, url string, dialOpts ...grpc.DialOption) (*grpc.ClientConn, error)
}

Client .

type ConnectorF

type ConnectorF func(conn *grpc.ClientConn) (smf4go.Service, error)

ConnectorF .

type CreatorF

type CreatorF func(config scf4go.Config) (Service, error)

CreatorF .

type Option added in v0.0.2

type Option func(*registerImpl)

Option .

func WithLocalService added in v0.0.2

func WithLocalService(localservice localservice.LocalService) Option

WithLocalService .

func WithMeshBuilder added in v0.0.2

func WithMeshBuilder(builder smf4go.MeshBuilder) Option

WithMeshBuilder .

func WithProvider

func WithProvider(name string) Option

WithProvider .

type Provider

type Provider interface {
	Listener() net.Listener
	Connect(ctx context.Context, remote string) (net.Conn, error)
}

Provider .

type Register

type Register interface {
	Client
	Local(name string, creator CreatorF)
	Remote(name string, connector ConnectorF)
}

Register .

func New

func New(name string, options ...Option) Register

New .

type Service

type Service interface {
	smf4go.Service
	GrpcHandler(server *grpc.Server) error
}

Service .

Jump to

Keyboard shortcuts

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