forwarder

package
v0.1.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator struct {
	ServiceNames     []string
	ReconnectTimeout string
	DSN              string
	KeyFile          string
	Port             int
}

func (Creator) Create

func (c Creator) Create() (client *Forwarder, err error)

type Forwarder

type Forwarder struct {
	ServerAddr string
	UserName   string
	ApName     string
	KeyFile    string

	sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(userName string) *Forwarder

func (*Forwarder) AddServices

func (fw *Forwarder) AddServices(s ...*Service)

func (*Forwarder) Close

func (fw *Forwarder) Close() error

func (*Forwarder) GetService

func (fw *Forwarder) GetService(name string) (s *Service)

func (*Forwarder) IsRunning

func (fw *Forwarder) IsRunning() bool

func (*Forwarder) Run

func (fw *Forwarder) Run() (err error)

func (*Forwarder) SetReconnectTimeout

func (fw *Forwarder) SetReconnectTimeout(t time.Duration)

func (*Forwarder) Setup

func (fw *Forwarder) Setup(appender task.Appender) (err error)

func (*Forwarder) Start

func (fw *Forwarder) Start(done func()) (stop task.Stoper, err error)

func (*Forwarder) Stop

func (fw *Forwarder) Stop()

type IsServiceRunningError

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

func (IsServiceRunningError) Error

func (e IsServiceRunningError) Error() string

type Service

type Service struct {
	Name string
	Addr string
	// contains filtered or unexported fields
}

func NewService

func NewService(name string, addr string) (*Service, error)

func (*Service) IsRunning

func (s *Service) IsRunning() bool

func (*Service) Listen

func (s *Service) Listen() (err error)

func (*Service) PostTaskStart

func (s *Service) PostTaskStart(r *task.Runner)

func (*Service) Run

func (s *Service) Run() (err error)

func (*Service) Setup

func (s *Service) Setup(appender task.Appender) error

func (*Service) Start

func (s *Service) Start(done func()) (stop task.Stoper, err error)

func (*Service) Stop

func (s *Service) Stop()

Jump to

Keyboard shortcuts

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