message

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package message is a service to process and return Agent Base messages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is a structure with methods that execute the service functions for Agent messages

func NewMessageService

func NewMessageService(id uuid.UUID) (*Service, error)

NewMessageService is a factory to create and return a ListenerService

func (*Service) Construct

func (s *Service) Construct(msg messages.Base) (data []byte, err error)

Construct takes a Base message and executes the appropriate Listener's Transforms (encoding/encryption) on the input Base message and returns the Base message as bytes

func (*Service) Handle

func (s *Service) Handle(id uuid.UUID, data []byte) (rdata []byte, err error)

Handle is the primary entry function that processes incoming raw data Agent traffic. The raw data is decoded/decrypted by either Listener or Agent's secret key depending on if the Agent completed authentication. Delegate messages are handled here. Once completed, this function checks for return messages that belong to the input Agent and returns them along with any delegate messages.

Jump to

Keyboard shortcuts

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