Versions in this module Expand all Collapse all v0 v0.0.1 Mar 25, 2021 Changes in this version + var BadProtocolExpectingAddress = errors.New("bad protocol: expecting address") + var InvalidToken = errors.New("invalid token") + var NotAcceptingConnections = errors.New("not accepting connections") + var ServerShuttingDown = errors.New("server is shutting down") + func GenerateRandomBytes(n int) []byte + type Config struct + AcceptTimeout time.Duration + EnableOpenTracing bool + EnablePrometheus bool + Log *log.Logger + OnAuthFunc grpc_auth.AuthFunc + OnConnectFunc func(ctx context.Context, service string) (string, func(), error) + OnListenFunc func(ctx context.Context, service string) (string, func(), error) + Services map[string]ServiceConfig + type Server struct + OnConnectFunc func(ctx context.Context, service string) (string, func(), error) + OnListenFunc func(ctx context.Context, service string) (string, func(), error) + func New(config Config) (*Server, error) + func (s *Server) AcceptConnection(acceptStream grpcapi.RemoteHost_AcceptConnectionServer) error + func (s *Server) Connect(grpcConnnection grpcapi.RemoteHost_ConnectServer) error + func (s *Server) Listen(address *grpcapi.ServiceAddress, listenServer grpcapi.RemoteHost_ListenServer) error + func (s *Server) SetServices(services map[string]ServiceConfig) + func (s *Server) Start(l net.Listener) + func (s *Server) Stop() + type ServiceConfig struct + Listen string + Listener net.Listener