Documentation
¶
Overview ¶
Package fake provides a process-local agent backend for development and provider contract tests. It deliberately stores no secret values.
Index ¶
- Variables
- type Backend
- func (b *Backend) DeleteInstance(_ context.Context, ref agentbackend.InstanceRef) (agentbackend.DeleteResult, error)
- func (b *Backend) DeletePool(_ context.Context, ref agentbackend.PoolRef) (agentbackend.DeleteResult, error)
- func (b *Backend) GetPoolUtilization(_ context.Context, ref agentbackend.PoolRef) (agentbackend.UtilizationSnapshot, error)
- func (b *Backend) ObserveInstance(_ context.Context, ref agentbackend.InstanceRef) (agentbackend.InstanceObservation, error)
- func (b *Backend) ObservePool(_ context.Context, ref agentbackend.PoolRef) (agentbackend.PoolObservation, error)
- func (b *Backend) ReconcileInstance(_ context.Context, desired agentbackend.DesiredInstance) (agentbackend.InstanceObservation, error)
- func (b *Backend) ReconcilePool(_ context.Context, desired agentbackend.DesiredPool) (agentbackend.PoolObservation, error)
- func (b *Backend) Subscribe(ctx context.Context, handler func(context.Context, agentbackend.Event) error) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidDesiredState = errors.New("invalid desired state")
)
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) DeleteInstance ¶
func (b *Backend) DeleteInstance(_ context.Context, ref agentbackend.InstanceRef) (agentbackend.DeleteResult, error)
func (*Backend) DeletePool ¶
func (b *Backend) DeletePool(_ context.Context, ref agentbackend.PoolRef) (agentbackend.DeleteResult, error)
func (*Backend) GetPoolUtilization ¶
func (b *Backend) GetPoolUtilization(_ context.Context, ref agentbackend.PoolRef) (agentbackend.UtilizationSnapshot, error)
func (*Backend) ObserveInstance ¶
func (b *Backend) ObserveInstance(_ context.Context, ref agentbackend.InstanceRef) (agentbackend.InstanceObservation, error)
func (*Backend) ObservePool ¶
func (b *Backend) ObservePool(_ context.Context, ref agentbackend.PoolRef) (agentbackend.PoolObservation, error)
func (*Backend) ReconcileInstance ¶
func (b *Backend) ReconcileInstance(_ context.Context, desired agentbackend.DesiredInstance) (agentbackend.InstanceObservation, error)
func (*Backend) ReconcilePool ¶
func (b *Backend) ReconcilePool(_ context.Context, desired agentbackend.DesiredPool) (agentbackend.PoolObservation, error)
Click to show internal directories.
Click to hide internal directories.