grpc

package
v0.0.0-...-037b315 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*grpc.Server
	// contains filtered or unexported fields
}

func New

func New(opts ...ServerOption) (srv *Server, err error)

func (*Server) Endpoint

func (s *Server) Endpoint() (*url.URL, error)

func (*Server) HandleNotify

func (s *Server) HandleNotify(ctx context.Context, req *cluster.NotifyMessage) (rsp *cluster.MemberHandleResponse, err error)

func (*Server) HandlePush

func (s *Server) HandlePush(ctx context.Context, req *cluster.PushMessage) (rsp *cluster.MemberHandleResponse, err error)

func (*Server) HandleRequest

func (s *Server) HandleRequest(ctx context.Context, req *cluster.RequestMessage) (rsp *cluster.MemberHandleResponse, err error)

func (*Server) HandleResponse

func (s *Server) HandleResponse(ctx context.Context, req *cluster.ResponseMessage) (rsp *cluster.MemberHandleResponse, err error)

func (*Server) Name

func (s *Server) Name() string

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) (err error)

type ServerOption

type ServerOption func(s *Server)

func Address

func Address(addr string) ServerOption

func Listen

func Listen(lis net.Listener) ServerOption

func Log

func Log(log log.Logger) ServerOption

func Network

func Network(network string) ServerOption

Jump to

Keyboard shortcuts

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