agent

package
v0.0.0-...-0e4f5d7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

* Copyright 2019, EnMasse authors. * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).

Index

Constants

View Source
const (
	AgentEventTypeRestart        = "restart"
	AgentEventInsertOrUpdateType = "insertOrUpdate"
	AgentEventTypeDelete         = "delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentAddress

type AgentAddress struct {
	Name                  string
	AddressSpace          string
	AddressSpaceNamespace string
	Address               string
	Depth                 int
	MessagesIn            int `json:"messages_in"`
	MessagesOut           int `json:"messages_out"`
	Senders               int
	Receivers             int
	Shards                []AgentAddressShards
}

func FromAgentAddressBody

func FromAgentAddressBody(agentAddressMap map[string]interface{}) (*AgentAddress, error)
type AgentAddressLink struct {
	Address string
	Name    interface{}
	Uuid    string
	/* Populated for Standard */
	Accepted    int
	Released    int
	Rejected    int
	Modified    int
	Unsettled   int
	Undelivered int
	Presettled  int
	Links       []AgentLink /* the individual links, >1 for the fanout cases */
	/* Populated for Standard and Brokered */
	Deliveries int
}

type AgentAddressShards

type AgentAddressShards struct {
	Name         string
	Consumers    int
	Enqueued     int
	Acknowledged int
	Killed       int
}

type AgentConnection

type AgentConnection struct {
	Id                    string
	Uuid                  string
	Host                  string
	Container             string
	AddressSpace          string
	AddressSpaceNamespace string
	AddressSpaceType      string
	Properties            map[string]string
	Encrypted             bool
	SaslMechanism         string `json:"sasl_mechanism"`
	User                  string
	CreationTimestamp     int64 `json:"creationTimestamp"`
	MessagesIn            int   `json:"messages_in"`
	MessagesOut           int   `json:"messages_out"`
	Outcomes              map[string]AgentOutcome
	Senders               []AgentAddressLink
	Receivers             []AgentAddressLink
	LastUpdated           int64
}

func FromAgentConnectionBody

func FromAgentConnectionBody(agentConnectionMap map[string]interface{}) (*AgentConnection, error)

type AgentEvent

type AgentEvent struct {
	InfraUuid             string
	AddressSpace          string
	AddressSpaceNamespace string
	Type                  AgentEventType
	Object                interface{}
}

type AgentEventType

type AgentEventType string
type AgentLink struct {
	Identity         string
	Name             string
	OperStatus       string
	AdminStatus      string
	DeliveryCount    int
	Capacity         int
	Backlog          int
	RouterName       string
	ClientName       string
	AcceptedCount    int
	ReleasedCount    int
	ModifiedCount    int
	UnsettledCount   int
	PresettledCount  int
	UndeliveredCount int
	LastUpdated      int64
}

type AgentOutcome

type AgentOutcome struct {
	Accepted    int
	Released    int
	Rejected    int
	Modified    int
	Unsettled   int
	Presettled  int
	Undelivered int
	Links       []AgentLink
}

type CommandDelegate

type CommandDelegate interface {
	PurgeAddress(address string) error
	CloseConnection(address v1.ObjectMeta) error
	Shutdown()
}

type Delegate

type Delegate interface {
	Collect(handler EventHandler) error
	CommandDelegate(bearerToken string, impersonateUser string) (CommandDelegate, error)
	Shutdown()
}

func NewAmqpAgentDelegate

func NewAmqpAgentDelegate(bearerToken, host string, port int32, tlsConfig *tls.Config, addressSpaceNamespace, addressSpace, infraUuid string, expirePeriod, connectTimeout time.Duration, maxFrameSize uint32) Delegate

type DelegateCreator

type DelegateCreator = func(bearerToken, host string, port int32) Delegate

type EventHandler

type EventHandler = func(event AgentEvent) error

Jump to

Keyboard shortcuts

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