provider

package
v0.0.0-...-a1b4a84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() 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 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

func (*FakeLabeller) Labels

func (s *FakeLabeller) Labels(ctx context.Context, namespace string) (map[string]string, error)

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

func NewFakeLabeller(labels map[string]string) Labeller

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) Deploy

func (*Provider) Init

func (p *Provider) Init(opt *types.ProviderOption) error

func (*Provider) Inspect

func (p *Provider) Inspect(ctx context.Context, req *pb.GetFunctionRequest, cni *cninetwork.CNIManager) ([]*pb.Function, error)

func (*Provider) Remove

func (*Provider) Resolve

func (p *Provider) Resolve(ctx context.Context, functionName string, cni *cninetwork.CNIManager) (url.URL, 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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL