server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LisServer

type LisServer struct {
	Listener net.Listener
	Server   RPCServer
}

LisServer is a container for RPC Listener and Server

type RPCServer

type RPCServer interface {
	Serve(net.Listener) error
	Stop()
}

RPCServer brings compatibility for raw (http/2) and web (http/1.1) RPC

type Server

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

Server is the RPC server and contains variables needed for RPC to work.

func NewServer

func NewServer(m *mesh.Mesh, authCrt string) (*Server, error)

NewServer creates a new RPC server.

func (*Server) CleanUp

func (s *Server) CleanUp()

CleanUp the RPC server.

func (*Server) Publish

func (s *Server) Publish(ctx context.Context, data *rpc.PublishData) (*rpc.Response, error)

Publish serves a publish request over RPC

func (*Server) RegisterToPublish

func (s *Server) RegisterToPublish(ctx context.Context, info *rpc.PeerTopicInfo) (*rpc.Response, error)

RegisterToPublish register a peer and topic with the remote access server.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown all RPC server currently running.

func (*Server) Start

func (s *Server) Start()

func (*Server) Subscribe

func (s *Server) Subscribe(info *rpc.PeerTopicInfo, stream rpc.Mesh_SubscribeServer) error

Subscribe serves a subscribe request over RPC

func (*Server) UnregisterToPublish added in v0.1.0

func (s *Server) UnregisterToPublish(ctx context.Context, info *rpc.PeerTopicInfo) (*rpc.Response, error)

UnregisterToPublish unregister a peer and topic with the remote access server.

func (*Server) Unsubscribe added in v0.1.0

func (s *Server) Unsubscribe(ctx context.Context, info *rpc.PeerTopicInfo) (*rpc.Response, error)

Unsubscribe serves an unsubscribe request over RPC

type WrapperHTTP

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

func (*WrapperHTTP) Serve

func (wh *WrapperHTTP) Serve(l net.Listener) error

func (*WrapperHTTP) Stop

func (wh *WrapperHTTP) Stop()

Jump to

Keyboard shortcuts

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