grpcServer

package
v0.0.0-...-c883a0f Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProtocol = "tcp"
	DefaultPort     = "45678"
	GoogleDNS       = "8.8.8.8:80"

	TryUpdateIPMapPeriod = 1 * time.Second
)

Variables

This section is empty.

Functions

func GetOutboundIP

func GetOutboundIP() string

Get preferred outbound ip of this machine

Types

type Server

type Server struct {
	ID         uuid.UUID
	Handler    requestHandling.Handler
	IP         utils.IP
	MapperIP   utils.IP
	Registered bool
}

func NewServer

func NewServer(port string) Server

func (*Server) HandleRemoteEntities

func (s *Server) HandleRemoteEntities()

func (*Server) Listen

func (s *Server) Listen()

func (*Server) LoadIPMapFromFile

func (s *Server) LoadIPMapFromFile()

func (*Server) RequestIPMapUpdate

func (s *Server) RequestIPMapUpdate() error

func (*Server) TryRegister

func (s *Server) TryRegister(mapperIP utils.IP) error

func (*Server) WaitRequestIPMapUpdate

func (s *Server) WaitRequestIPMapUpdate()

Jump to

Keyboard shortcuts

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