rpc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllPerms     = []auth.Permission{"public", "read", "write", "admin"}
	DefaultPerms = []auth.Permission{"public"}
)

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(address, port string) *Server

func (*Server) ListenAddr

func (s *Server) ListenAddr() string

ListenAddr returns the listen address of the server.

func (*Server) RegisterAuthedService

func (s *Server) RegisterAuthedService(namespace string, service interface{}, out interface{})

RegisterAuthedService registers a service onto the RPC server. All methods on the service will then be exposed over the RPC.

func (*Server) RegisterService

func (s *Server) RegisterService(namespace string, service interface{})

RegisterService registers a service onto the RPC server. All methods on the service will then be exposed over the RPC.

func (*Server) Start

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

Start starts the RPC Server.

func (*Server) Stop

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

Stop stops the RPC Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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