Documentation
¶
Index ¶
- Constants
- type Builder
- type Deployer
- type Describer
- type Lister
- type MCPServer
- type PipelinesProvider
- func (p *PipelinesProvider) ConfigurePAC(ctx context.Context, f fn.Function, metadata any) error
- func (p *PipelinesProvider) Remove(ctx context.Context, f fn.Function) error
- func (p *PipelinesProvider) RemovePAC(ctx context.Context, f fn.Function, metadata any) error
- func (p *PipelinesProvider) Run(ctx context.Context, f fn.Function) (string, fn.Function, error)
- type Pusher
- type Remover
- type Runner
Constants ¶
View Source
const DefaultNamespace = "default"
DefaultNamespace for mock deployments See deployer implementations for tests which ensure the currently active kube namespace is chosen when no explicit namespace is provided. This mock emulates a deployer which responds that the function was deployed to desired or previously-deployed ns or "default" if not defined.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
func NewBuilder ¶
func NewBuilder() *Builder
type Deployer ¶
type Deployer struct {
DeployInvoked bool
DeployFn func(context.Context, fn.Function) (fn.DeploymentResult, error)
}
func NewDeployer ¶
func NewDeployer() *Deployer
func NewDeployerWithResult ¶
func NewDeployerWithResult(result fn.DeploymentResult) *Deployer
NewDeployerWithResult is a convenience method for creating a mock deployer with a deploy function implementation which returns the given result and no error.
type Describer ¶
type Describer struct {
DescribeInvoked bool
DescribeFn func(context.Context, string, string) (fn.Instance, error)
}
func NewDescriber ¶
func NewDescriber() *Describer
type MCPServer ¶ added in v0.48.0
func NewMCPServer ¶ added in v0.48.0
func NewMCPServer() *MCPServer
type PipelinesProvider ¶
type PipelinesProvider struct {
RunInvoked bool
RunFn func(fn.Function) (string, fn.Function, error)
RemoveInvoked bool
RemoveFn func(fn.Function) error
ConfigurePACInvoked bool
ConfigurePACFn func(fn.Function) error
RemovePACInvoked bool
RemovePACFn func(fn.Function) error
}
func NewPipelinesProvider ¶
func NewPipelinesProvider() *PipelinesProvider
func (*PipelinesProvider) ConfigurePAC ¶
type Remover ¶
func NewRemover ¶
func NewRemover() *Remover
type Runner ¶
type Runner struct {
RunInvoked bool
RootRequested string
RunFn func(context.Context, fn.Function, string, time.Duration) (*fn.Job, error)
sync.Mutex
}
Runner runs a function in a separate process, canceling it on context.Cancel. Immediately returned is the port of the running function.
Click to show internal directories.
Click to hide internal directories.