meta

package
v1.999.320 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 19 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePort added in v1.999.310

func CreatePort(options PortOptions) (gen.MetaBehavior, error)

func CreateTCPConnection

func CreateTCPConnection(options TCPConnectionOptions) (gen.MetaBehavior, error)

func CreateTCPServer

func CreateTCPServer(options TCPServerOptions) (gen.MetaBehavior, error)

func CreateUDPServer

func CreateUDPServer(options UDPServerOptions) (gen.MetaBehavior, error)

func CreateWebServer

func CreateWebServer(options WebServerOptions) (gen.MetaBehavior, error)

Types

type ChunkOptions added in v1.999.310

type ChunkOptions struct {
	Enable                     bool
	FixedLength                int
	HeaderSize                 int
	HeaderLengthPosition       int // within the header
	HeaderLengthSize           int // 1, 2 or 4
	HeaderLengthIncludesHeader bool
	MaxLength                  int
}

func (ChunkOptions) IsValid added in v1.999.310

func (co ChunkOptions) IsValid() error

type MessagePortData added in v1.999.310

type MessagePortData struct {
	ID   gen.Alias
	Tag  string
	Data []byte
}

type MessagePortError added in v1.999.310

type MessagePortError struct {
	ID    gen.Alias
	Tag   string
	Error error
}

type MessagePortStart added in v1.999.310

type MessagePortStart struct {
	ID  gen.Alias
	Tag string
}

type MessagePortTerminate added in v1.999.310

type MessagePortTerminate struct {
	ID  gen.Alias
	Tag string
}

type MessagePortText added in v1.999.310

type MessagePortText struct {
	ID   gen.Alias
	Tag  string
	Text string
}

type MessageTCP

type MessageTCP struct {
	ID   gen.Alias
	Data []byte
}

type MessageTCPConnect

type MessageTCPConnect struct {
	ID         gen.Alias
	RemoteAddr net.Addr
	LocalAddr  net.Addr
}

type MessageTCPDisconnect

type MessageTCPDisconnect struct {
	ID gen.Alias
}

type MessageUDP

type MessageUDP struct {
	ID   gen.Alias
	Addr net.Addr
	Data []byte
}

type MessageWebRequest

type MessageWebRequest struct {
	Response http.ResponseWriter
	Request  *http.Request
	Done     func()
}

type PortBinaryOptions added in v1.999.310

type PortBinaryOptions struct {
	Enable                     bool
	ReadBufferSize             int
	ReadBufferPool             *sync.Pool
	ReadChunk                  ChunkOptions
	WriteBufferKeepAlive       []byte
	WriteBufferKeepAlivePeriod time.Duration
}

type PortOptions added in v1.999.310

type PortOptions struct {
	Cmd             string
	Args            []string
	Env             map[gen.Env]string
	EnableEnvMeta   bool
	EnableEnvOS     bool
	Tag             string
	Process         gen.Atom
	SplitFuncStdout bufio.SplitFunc
	SplitFuncStderr bufio.SplitFunc
	Binary          PortBinaryOptions
}

type TCPAdvancedOptions added in v1.999.310

type TCPAdvancedOptions struct {
	KeepAlivePeriod time.Duration
}

type TCPConnectionOptions

type TCPConnectionOptions struct {
	Host               string
	Port               uint16
	Process            gen.Atom
	CertManager        gen.CertManager
	InsecureSkipVerify bool

	ReadBufferSize             int
	ReadBufferPool             *sync.Pool
	ReadChunk                  ChunkOptions
	WriteBufferKeepAlive       []byte
	WriteBufferKeepAlivePeriod time.Duration

	Advanced TCPAdvancedOptions
}

type TCPServerOptions

type TCPServerOptions struct {
	Host               string
	Port               uint16
	ProcessPool        []gen.Atom
	CertManager        gen.CertManager
	InsecureSkipVerify bool

	ReadBufferSize             int
	ReadBufferPool             *sync.Pool
	ReadChunk                  ChunkOptions
	WriteBufferKeepAlive       []byte
	WriteBufferKeepAlivePeriod time.Duration

	Advanced TCPAdvancedOptions
}

type UDPServerOptions

type UDPServerOptions struct {
	Host       string
	Port       uint16
	Process    gen.Atom
	BufferSize int
	BufferPool *sync.Pool
}

type WebHandler

type WebHandler interface {
	http.Handler
	gen.MetaBehavior
}

func CreateWebHandler

func CreateWebHandler(options WebHandlerOptions) WebHandler

type WebHandlerOptions

type WebHandlerOptions struct {
	Worker         gen.Atom
	RequestTimeout time.Duration
}

type WebServerOptions

type WebServerOptions struct {
	Host        string
	Port        uint16
	CertManager gen.CertManager
	Handler     http.Handler
}

Jump to

Keyboard shortcuts

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