Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deleter ¶
type Deleter interface {
Delete(ctx *agentops.AppContext, id string) error
}
Deleter is an optional interface for resources that support deletion.
type Record ¶
type Record struct {
Kind string `json:"kind"`
ID string `json:"id"`
Fields map[string]any `json:"fields"`
RawPath string `json:"raw_path,omitempty"`
}
Record is a generic representation of a resource instance.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered resource kinds.
type Resource ¶
type Resource interface {
Schema() ResourceSchema
Create(ctx *agentops.AppContext, slug string, opts map[string]string) (*Record, error)
List(ctx *agentops.AppContext, filter Filter) ([]Record, error)
Get(ctx *agentops.AppContext, id string) (*Record, error)
}
Resource is the core interface every agentops resource kind must implement.
type ResourceSchema ¶
type ResourceSchema struct {
Kind string
Fields []FieldDef
Statuses []string
CreateArgs []ArgDef
Description string
}
ResourceSchema describes the shape and rules of a resource kind.
type Syncer ¶
type Syncer interface {
Sync(ctx *agentops.AppContext, id string) error
}
Syncer is an optional interface for resources that support external sync.
type Transitioner ¶
type Transitioner interface {
Transition(ctx *agentops.AppContext, id string, action string) (*Record, error)
}
Transitioner is an optional interface for resources with state machines.
type Validator ¶
type Validator interface {
Validate(ctx *agentops.AppContext, id string) (*agentops.DoctorReport, error)
}
Validator is an optional interface for resources that support compliance checks.
Click to show internal directories.
Click to hide internal directories.