grpcservice

package module
v0.0.0-...-22e892a Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 10 Imported by: 0

README

grpcservice

gomesh grpc extension

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) (gomesh.Service, error)

ConnectorF .

type CreatorF

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

CreatorF .

type GrpcService

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

GrpcService .

func New

func New(mesh gomesh.Mesh, options ...Option) GrpcService

New create new gomesh grpcservice module instance

type Option

type Option func(impl *grpcServiceImpl)

Option .

func WithProvider

func WithProvider(name string) Option

WithProvider .

type Provider

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

Provider .

type Service

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

Service .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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