config

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name             string
	MemoryController string
	Memory           map[string]map[string]string
	Rules            []string
	Endpoints        []string
	Tick             time.Duration
}

Agent represents an agent config

func NewAgent

func NewAgent(name string) *Agent

NewAgent creates a new agent with the specified name and some default values

func (*Agent) AddMemoryItem

func (a *Agent) AddMemoryItem(item string) error

AddMemoryItem parses a memory item string and adds it to the agent

func (*Agent) SetMemoryController

func (a *Agent) SetMemoryController(controller string)

SetMemoryController sets a memory controller for the agent

func (*Agent) SetTick

func (a *Agent) SetTick(tick string) error

SetTick sets a tick for the agent

func (*Agent) ToAgentConfiguration

func (a *Agent) ToAgentConfiguration() *schema.AgentConfiguration

ToAgentConfiguration converts the current agent to a valid schema AgentConfiguration

type Config

type Config struct {
	Image            string
	CoordinatorImage string
	Namespace        string
	Agents           map[string]Agent
}

Config represents a configuration

func Parse

func Parse(filename string) (*Config, error)

Parse parses a configuration file given its path

Jump to

Keyboard shortcuts

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