ap

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ap

type Ap struct {
	ID         string
	ServerAddr string
	ApName     string
	KeyFile    string
	Version    *common.Version
	Services   map[string]*Service

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(apName string) *Ap

func (*Ap) Close

func (c *Ap) Close() error

func (*Ap) Forever

func (c *Ap) Forever()

func (*Ap) SetReconnectTimeout

func (c *Ap) SetReconnectTimeout(t time.Duration)

type IOCloser added in v0.1.11

type IOCloser func() error

func (IOCloser) Close added in v0.1.11

func (c IOCloser) Close() error

type SSHListener added in v0.1.11

type SSHListener struct {
	Source chan net.Conn
}

func NewSSHListener added in v0.1.11

func NewSSHListener(source chan net.Conn) *SSHListener

func (*SSHListener) Accept added in v0.1.11

func (l *SSHListener) Accept() (net.Conn, error)

func (*SSHListener) Addr added in v0.1.11

func (l *SSHListener) Addr() (addr net.Addr)

func (*SSHListener) Close added in v0.1.11

func (l *SSHListener) Close() error

type Service

type Service struct {
	Name        string
	Addr        string
	ForeverFunc func(sl *ServiceListener)
	// contains filtered or unexported fields
}

func SSHServer

func SSHServer(keyFile string) (srvc *Service, closer io.Closer)

func (*Service) Close

func (s *Service) Close() error

func (*Service) OnClose

func (s *Service) OnClose(f ...func()) *Service

func (*Service) Register

func (s *Service) Register(prefix string, ln net.Listener) *ServiceListener

type ServiceConfig added in v0.1.5

type ServiceConfig struct {
	Name             string
	SocketPath       string
	NetAddr          string
	ConnectionsCount int
}

func ParseServiceDSN added in v0.1.5

func ParseServiceDSN(dsn string) (cfg ServiceConfig, err error)

func (ServiceConfig) String added in v0.1.5

func (cfg ServiceConfig) String() (s string)

type ServiceListener

type ServiceListener struct {
	net.Listener
	ID string
	// contains filtered or unexported fields
}

func (*ServiceListener) Close

func (ln *ServiceListener) Close()

func (*ServiceListener) OnClose

func (ln *ServiceListener) OnClose(f ...func()) *ServiceListener

Jump to

Keyboard shortcuts

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