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 ¶
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.
Click to show internal directories.
Click to hide internal directories.