executable

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTimeout

func WithTimeout(timeoutStr string, fn func() error) error

Types

type Agent

type Agent interface {
	Name() consts.AgentType
	Exec(executable Executable) error
}

type Executable

type Executable struct {
	Type        consts.AgentType       `yaml:"type"`
	Name        string                 `yaml:"name"`
	Description string                 `yaml:"description"`
	Aliases     []string               `yaml:"aliases"`
	Tags        []string               `yaml:"tags"`
	Spec        map[string]interface{} `yaml:"spec"`
	// contains filtered or unexported fields
}

func (*Executable) GetContext

func (e *Executable) GetContext() (workspace, workspacePath, namespace string)

func (*Executable) ID

func (e *Executable) ID() string

func (*Executable) MergeTags

func (e *Executable) MergeTags(tags []string)

func (*Executable) SetContext

func (e *Executable) SetContext(workspace, workspacePath, namespace string)

func (*Executable) Validate

func (e *Executable) Validate() error

type List

type List []*Executable

func (*List) FilterByTag

func (l *List) FilterByTag(tag string) []*Executable

func (*List) FilterByTags

func (l *List) FilterByTags(tags []string) []*Executable

func (*List) FilterByType

func (l *List) FilterByType(agent consts.AgentType) []*Executable

func (*List) FindByTypeAndName

func (l *List) FindByTypeAndName(agent consts.AgentType, name string) (*Executable, error)

type Preference

type Preference map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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