agentgroup

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentgroup defines the AgentGroup model and related types.

Index

Constants

View Source
const (
	// Version1 is the initial version of the agent group.
	Version1 = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentGroup

type AgentGroup struct {
	// Version is the version of the agent group.
	Version Version
	// UID is the unique identifier for the agent group.
	UID uuid.UUID
	// Name is the name of the agent group.
	Name string
	// Attributes is a map of attributes associated with the agent group.
	Attributes Attributes
	// Selector is a set of criteria used to select agents for the group.
	Selector AgentSelector
	// CreatedAt is the timestamp when the agent group was created.
	CreatedAt time.Time
	// CreatedBy is the identifier of the user or system that created the agent group.
	CreatedBy string
	// DeletedAt is the timestamp when the agent group was deleted. It is nil if the agent group is not deleted.
	DeletedAt *time.Time
	// DeletedBy is the identifier of the user or system that deleted the agent group. It
	DeletedBy *string
}

AgentGroup represents a group of agents with their associated metadata.

func New

func New(
	name string,
	attributes Attributes,
	createdAt time.Time,
	createdBy string,
) *AgentGroup

New creates a new instance of AgentGroup with the provided name, attributes, createdAt timestamp, and createdBy identifier.

func (*AgentGroup) IsDeleted

func (ag *AgentGroup) IsDeleted() bool

IsDeleted returns true if the agent group is marked as deleted.

func (*AgentGroup) MarkDeleted

func (ag *AgentGroup) MarkDeleted(deletedAt time.Time, deletedBy string)

MarkDeleted marks the agent group as deleted by setting the DeletedAt and DeletedBy fields.

type AgentSelector

type AgentSelector struct {
	// IdentifyingAttributes is a map of identifying attributes used to select agents.
	IdentifyingAttributes map[string]string
	// NonIdentifyingAttributes is a map of non-identifying attributes used to select agents.
	NonIdentifyingAttributes map[string]string
}

AgentSelector defines the criteria for selecting agents to be included in the agent group.

type Attributes

type Attributes map[string]string

Attributes represents a map of attributes for the agent group.

func OfAttributes

func OfAttributes(attributes map[string]string) Attributes

OfAttributes creates an Attributes instance from a map of attributes.

type Version

type Version string

Version represents the version of the agent group.

Jump to

Keyboard shortcuts

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