rpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignScheme = "sign"
)

Variables

View Source
var (
	ErrInvalidServiceName = errors.New("invalid service name")
	ErrListenAddrNotFound = errors.New("listen addr not found")
)

Functions

func DSN

func DSN(service string) string

func GetListenAddr

func GetListenAddr(port int, mod string) (string, error)

func Init

func Init(etcdAddr string)

func NewClient

func NewClient(service string, newClient func(cc *grpc.ClientConn))

Types

type OptionFunc

type OptionFunc func(opts *Options)

func WithMod added in v0.4.1

func WithMod(mod string) OptionFunc

type Options

type Options struct {
	Mod string
}

type Server

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

func NewServer

func NewServer(service, etcdAddr string, listenPort int, optsF ...OptionFunc) (*Server, error)

func (*Server) Register

func (s *Server) Register(registerServer func(grpc.ServiceRegistrar))

func (*Server) Serve

func (s *Server) Serve()

func (*Server) Stop

func (s *Server) Stop()

type SignBuilder

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

func (*SignBuilder) Build

func (*SignBuilder) Scheme

func (sb *SignBuilder) Scheme() string

type SignResolver

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

func (*SignResolver) Close

func (sr *SignResolver) Close()

Close closes the resolver.

func (*SignResolver) ResolveNow

func (sr *SignResolver) ResolveNow(rno resolver.ResolveNowOptions)

Jump to

Keyboard shortcuts

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