worker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchController

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

func NewMatchController

func NewMatchController() *MatchController

func (*MatchController) DealTransferConn

func (mc *MatchController) DealTransferConn(tc *TransferConn, timeout time.Duration) error

block until there is a same ID transfer conn or timeout

type Options

type Options struct {
	ServerAddr     string
	BindAddr       string
	AdvicePublicIP string

	LogFile    string
	LogLevel   string
	LogMaxDays int64
}

func (*Options) Check

func (op *Options) Check() error

type Register

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

func NewRegister

func NewRegister(port int64, advicePublicIP string, serverAddr string) *Register

func (*Register) Register

func (r *Register) Register(conn net.Conn) error

func (*Register) RunKeepAlive

func (r *Register) RunKeepAlive(conn net.Conn) error

type Service

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

func NewService

func NewService(options Options) (*Service, error)

func (*Service) Run

func (svc *Service) Run() error

type TransferConn

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

func NewTransferConn

func NewTransferConn(id string, conn net.Conn, isSender bool) *TransferConn

Jump to

Keyboard shortcuts

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