vulinboxagentproto

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionUDP         = "udp"
	ActionAck         = "ack"
	ActionDataback    = "databack"
	ActionSubscribe   = "subscribe"
	ActionUnsubscribe = "unsubscribe"
	ActionPing        = "ping"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AckAction

type AckAction struct {
	AgentProtocol
	Status string `json:"status"`
	Data   any    `json:"data,omitempty"`
}

func NewAckAction

func NewAckAction(id uint32, status string, data any) *AckAction

type AgentProtocol

type AgentProtocol struct {
	ActionId uint32 `json:"id"`
	Action   string `json:"action"`
}

type DatabackAction

type DatabackAction struct {
	AgentProtocol
	Type string `json:"type"`
	Data any    `json:"data,omitempty"`
}

func NewDataBackAction

func NewDataBackAction(tp string, data any) *DatabackAction

type PingAction

type PingAction struct {
	AgentProtocol
}

func NewPingAction

func NewPingAction() *PingAction

type SubscribeAction

type SubscribeAction struct {
	AgentProtocol
	Type  string   `json:"type"`
	Rules []string `json:"rules"`
}

func NewSubscribeAction added in v1.2.7

func NewSubscribeAction(tp string, rules []string) *SubscribeAction

type UDPAction

type UDPAction struct {
	AgentProtocol
	// base64 encoded content
	Content     string         `json:"content"`
	Target      netip.AddrPort `json:"target"`
	WaitTimeout time.Duration  `json:"wait_timeout"`
}

func NewUDPAction

func NewUDPAction(content []byte, target netip.AddrPort) *UDPAction

type UnsubscribeAction

type UnsubscribeAction struct {
	AgentProtocol
	Type  string   `json:"type"`
	Rules []string `json:"rules"`
}

func NewUnsubscribeAction added in v1.2.7

func NewUnsubscribeAction(tp string, rules []string) *UnsubscribeAction

Jump to

Keyboard shortcuts

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