Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - type Builder
 - type Client
 - type DNSProvider
 - type Deployer
 - type Describer
 - type Initializer
 - type Lister
 - 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 Repositories
 - 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 Client ¶
type Client struct {
	// Members used to confirm certain configuration was used for instantiation
	// (roughly map to the real clients WithX functions)
	Confirm          bool
	RepositoriesPath string
	// contains filtered or unexported fields
}
    func (*Client) Repositories ¶
func (c *Client) Repositories() *Repositories
type DNSProvider ¶
func NewDNSProvider ¶
func NewDNSProvider() *DNSProvider
func (*DNSProvider) Provide ¶
func (d *DNSProvider) Provide(name, address string) string
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 Initializer ¶
type Initializer struct {
	SupportedRuntimes []string
	InitializeInvoked bool
	InitializeFn      func(runtime, template, path string) error
}
    func NewInitializer ¶
func NewInitializer() *Initializer
func (*Initializer) Initialize ¶
func (i *Initializer) Initialize(runtime, template, path string) error
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 Repositories ¶
type Repositories struct {
	// Members which record whether or not the various methods were invoked.
	ListInvoked bool
	// contains filtered or unexported fields
}
    func NewRepositories ¶
func NewRepositories() *Repositories
func (*Repositories) All ¶
func (r *Repositories) All() ([]fn.Repository, error)
func (*Repositories) List ¶
func (r *Repositories) List() ([]string, error)
func (*Repositories) Remove ¶
func (r *Repositories) Remove(name string) error
func (*Repositories) Rename ¶
func (r *Repositories) Rename(old, new string) error
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.