tcp_client

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientMessage

type ClientMessage struct {
	RequestLayerNames struct{} `json:"RequestLayerNames"`
}

func (*ClientMessage) Bytes

func (c *ClientMessage) Bytes() []byte

type ConfigFileReload added in v0.4.0

type ConfigFileReload struct {
	New string `json:"new"`
}

type KanataTcpClient

type KanataTcpClient struct {
	ClientMessageCh chan ClientMessage
	Reconnect       chan struct{}
	// contains filtered or unexported fields
}

func NewTcpClient

func NewTcpClient() *KanataTcpClient

func (*KanataTcpClient) Connect

func (c *KanataTcpClient) Connect(ctx context.Context, port int) error

func (*KanataTcpClient) ServerMessageCh

func (c *KanataTcpClient) ServerMessageCh() <-chan ServerMessage

type LayerChange

type LayerChange struct {
	NewLayer string `json:"new"`
}

{"LayerChange":{"new":"newly-changed-to-layer"}}

type LayerNames

type LayerNames struct {
	Names []string `json:"names"`
}

type ServerMessage

type ServerMessage struct {
	LayerChange      *LayerChange      `json:"LayerChange"`
	LayerNames       *LayerNames       `json:"LayerNames"`
	ConfigFileReload *ConfigFileReload `json:"ConfigFileReload"`
}

Jump to

Keyboard shortcuts

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