Documentation
¶
Index ¶
- Variables
- type Agent
- func (a *Agent) Activate(ctx context.Context, b bundle.Bundle) error
- func (a *Agent) Eval(ctx context.Context, input []byte, pkg string) ([]byte, error)
- func (a *Agent) MustWatchBundleUpdates(ctx context.Context)
- func (a *Agent) SetBundle(name string) error
- func (a *Agent) SetRuntime()
- func (a *Agent) WatchBundleUpdates(ctx context.Context, errChan chan<- error)
- type AgentOpts
- type BundleModifyFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound error = fmt.Errorf("package not found")
)
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
BundleName string
ObjectStore jetstream.ObjectStore
OPAStore storage.Store
Logger *slog.Logger
Env map[string]string
Compiler *ast.Compiler
Modifiers []BundleModifyFunc
Cache cache.InterQueryCache
// contains filtered or unexported fields
}
func (*Agent) MustWatchBundleUpdates ¶
func (*Agent) SetBundle ¶
SetBundle updates the in-memory store with the bundle retrieved from the NATS object store
func (*Agent) SetRuntime ¶
func (a *Agent) SetRuntime()
type AgentOpts ¶
type AgentOpts struct {
BundleName string
ObjectStore jetstream.ObjectStore
Logger *slog.Logger
Env map[string]string
Modifiers []BundleModifyFunc
}
Click to show internal directories.
Click to hide internal directories.