hub

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClient

func AddClient(c *Client) bool

func DeleteClient

func DeleteClient(c *Client) bool

func InitHub

func InitHub()

func Run

func Run()

func SendMessage

func SendMessage(cmd *AgentCmd)

Types

type AgentCmd

type AgentCmd struct {
	AgentId string
	Cmd     string
}

type Client

type Client struct {
	Id   ClientID
	Conn *websocket.Conn
	Send chan []byte
}

func GetClientById

func GetClientById(agentId string) *Client

type ClientID

type ClientID = string

type Hub

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

func NewHub

func NewHub() *Hub

Jump to

Keyboard shortcuts

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