internal

package
v0.0.0-...-b4139b0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Products lib.Map[Product]

Functions

func Close

func Close()

func Load

func Load() error

func LoadClient

func LoadClient(m *types.Client) error

func LoadClients

func LoadClients() error

func LoadProduct

func LoadProduct(m *types.Product) error

func LoadProducts

func LoadProducts() error

func LoadSerial

func LoadSerial(m *types.Serial) error

func LoadSerials

func LoadSerials() error

func LoadServer

func LoadServer(m *types.Server) error

func LoadServers

func LoadServers() error

func Offline

func Offline(pid, id string)

func Online

func Online(pid, id string)

Types

type Client

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

Client 网络链接

func GetClient

func GetClient(id string) *Client

func NewClient

func NewClient(client *types.Client) *Client

func (*Client) Close

func (client *Client) Close() error

Close 关闭

func (*Client) Online

func (l *Client) Online() bool

func (*Client) Open

func (client *Client) Open() error

Open 打开

func (*Client) Pipe

func (l *Client) Pipe(pipe io.ReadWriteCloser)

func (*Client) Read

func (l *Client) Read(data []byte) (int, error)

Read 读

func (*Client) Retry

func (client *Client) Retry()

func (*Client) Running

func (l *Client) Running() bool

func (*Client) Write

func (l *Client) Write(data []byte) (int, error)

Write 写

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

Link 网络连接

func GetLink(id string) *Link

func (*Link) Close

func (l *Link) Close() error

Close 关闭

func (*Link) Online

func (l *Link) Online() bool

func (*Link) Open

func (l *Link) Open() error

func (*Link) Pipe

func (l *Link) Pipe(pipe io.ReadWriteCloser)

func (*Link) Read

func (l *Link) Read(data []byte) (int, error)

Read 读

func (*Link) Running

func (l *Link) Running() bool

func (*Link) Write

func (l *Link) Write(data []byte) (int, error)

Write 写

type Product

type Product struct {
	*types.Product
	// contains filtered or unexported fields
}

func GetProduct

func GetProduct(id string) *Product

type Serial

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

Serial 串口

func GetSerial

func GetSerial(id string) *Serial

func NewSerial

func NewSerial(model *types.Serial) *Serial

func (*Serial) Close

func (l *Serial) Close() error

Close 关闭

func (*Serial) Online

func (l *Serial) Online() bool

func (*Serial) Open

func (s *Serial) Open() error

Open 打开

func (*Serial) Pipe

func (l *Serial) Pipe(pipe io.ReadWriteCloser)

func (*Serial) Read

func (l *Serial) Read(data []byte) (int, error)

Read 读

func (*Serial) Retry

func (s *Serial) Retry()

func (*Serial) Running

func (l *Serial) Running() bool

func (*Serial) Write

func (l *Serial) Write(data []byte) (int, error)

Write 写

type Server

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

Server TCP服务器

func GetServer

func GetServer(id string) *Server

func NewServer

func NewServer(model *types.Server) *Server

func (*Server) Close

func (s *Server) Close() (err error)

Close 关闭

func (*Server) GetTunnel

func (s *Server) GetTunnel(id string) connect.Tunnel

GetTunnel 获取连接

func (*Server) Open

func (s *Server) Open() error

Open 打开

func (*Server) Running

func (s *Server) Running() bool

Jump to

Keyboard shortcuts

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