server

package
v0.0.0-...-b3fd7dc Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainProc

func MainProc(category string, typex string, registry *Registry, appHandler map[string]http.Handler)

MainProc is a main routine for rpc server processes

Types

type Registry

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

Registry represents a function registry

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new registry object

func (*Registry) AddService

func (reg *Registry) AddService(name string, service interface{})

AddService adds an service interface to the registry

func (*Registry) GetServiceNames

func (reg *Registry) GetServiceNames() []string

GetServiceNames returns all service names

func (*Registry) NewServer

func (registry *Registry) NewServer(category string, typex string, appHandler map[string]http.Handler) (*Server, error)

NewServer creates a new rpc server for a specific registry

type Server

type Server struct {
	Address      *net.TCPAddr
	StoppedEvent <-chan error
	// contains filtered or unexported fields
}

Server represents an rpc server

func (*Server) Unpublish

func (server *Server) Unpublish() error

Unpublish stops the rpc server

Jump to

Keyboard shortcuts

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