Documentation ¶
Index ¶
- func Close() error
- func Deploy(ctx context.Context, req *pb.CreateFunctionRequest, cni *cninetwork.CNIManager) (*pb.Function, error)
- func Init(opt *types.ProviderOption) error
- func Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error)
- func Remove(ctx context.Context, req *pb.DeleteFunctionRequest, cni *cninetwork.CNIManager) error
- func Resolve(ctx context.Context, functionName string, cni *cninetwork.CNIManager) (url.URL, error)
- type FakeLabeller
- type Labeller
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) Deploy(ctx context.Context, req *pb.CreateFunctionRequest, cni *cninetwork.CNIManager) (*pb.Function, error)
- func (p *Provider) Init(opt *types.ProviderOption) error
- func (p *Provider) Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error)
- func (p *Provider) Remove(ctx context.Context, req *pb.DeleteFunctionRequest, cni *cninetwork.CNIManager) error
- func (p *Provider) Resolve(ctx context.Context, functionName string, cni *cninetwork.CNIManager) (url.URL, error)
- type ProviderPluginInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(ctx context.Context, req *pb.CreateFunctionRequest, cni *cninetwork.CNIManager) (*pb.Function, error)
func Init ¶
func Init(opt *types.ProviderOption) error
func Inspect ¶
func Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error)
func Remove ¶
func Remove(ctx context.Context, req *pb.DeleteFunctionRequest, cni *cninetwork.CNIManager) error
func Resolve ¶
func Resolve(ctx context.Context, functionName string, cni *cninetwork.CNIManager) (url.URL, error)
Types ¶
type FakeLabeller ¶
type FakeLabeller struct {
// contains filtered or unexported fields
}
FakeLabeller can be used to fake labels applied on namespace to mark them valid/invalid for openfaas functions
type Labeller ¶
type Labeller interface {
Labels(ctx context.Context, namespace string) (map[string]string, error)
}
Labeller can return labels for a namespace from containerd.
func NewFakeLabeller ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Deploy ¶
func (p *Provider) Deploy(ctx context.Context, req *pb.CreateFunctionRequest, cni *cninetwork.CNIManager) (*pb.Function, error)
func (*Provider) Inspect ¶
func (p *Provider) Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error)
func (*Provider) Remove ¶
func (p *Provider) Remove(ctx context.Context, req *pb.DeleteFunctionRequest, cni *cninetwork.CNIManager) error
type ProviderPluginInterface ¶
type ProviderPluginInterface interface { Init(*types.ProviderOption, zerolog.Logger) error // 初始化Plugin Deploy(ctx context.Context, req *pb.CreateFunctionRequest, cni *cninetwork.CNIManager) (*pb.Function, error) Remove(ctx context.Context, req *pb.DeleteFunctionRequest, cni *cninetwork.CNIManager) error Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error) Resolve(ctx context.Context, functionName string, cni *cninetwork.CNIManager) (url.URL, error) Close() error }
Click to show internal directories.
Click to hide internal directories.