Documentation
¶
Index ¶
- type Server
- func (s *Server) Endpoint() (*url.URL, error)
- func (s *Server) HandleNotify(ctx context.Context, req *cluster.NotifyMessage) (rsp *cluster.MemberHandleResponse, err error)
- func (s *Server) HandlePush(ctx context.Context, req *cluster.PushMessage) (rsp *cluster.MemberHandleResponse, err error)
- func (s *Server) HandleRequest(ctx context.Context, req *cluster.RequestMessage) (rsp *cluster.MemberHandleResponse, err error)
- func (s *Server) HandleResponse(ctx context.Context, req *cluster.ResponseMessage) (rsp *cluster.MemberHandleResponse, err error)
- func (s *Server) Name() string
- func (s *Server) Start(ctx context.Context) (err error)
- func (s *Server) Stop(ctx context.Context) (err error)
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
func New ¶
func New(opts ...ServerOption) (srv *Server, err 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)
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
Click to show internal directories.
Click to hide internal directories.