provider

package
v0.0.0-...-1922809 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MPL-2.0 Imports: 1 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ErrorLoadingDriverConfig = "unable to load driver config"
	ErrorListingFunctions    = "unable to list functions"
	ErrorInvokingFunction    = "unable to invoke function"
)

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(name string, newFunc NewProviderFunc)

Types

type Conf

type Conf interface{}

type Function

type Function struct {
	Name    string
	Version string
}

func (Function) GetName

func (f Function) GetName() string

func (Function) GetVersion

func (f Function) GetVersion() string

func (*Function) SetVersion

func (f *Function) SetVersion(v string)

type Initializer

type Initializer interface {
	Init(Conf) error
}

type Invoker

type Invoker interface {
	Invoke(detail Function, body []byte) (*Response, error)
}

type Lister

type Lister interface {
	List() ([]Function, error)
}

type NewProviderFunc

type NewProviderFunc func() (Provider, error)

type Provider

type Provider interface {
	Lister
	Invoker
	Initializer
}

func GetProvider

func GetProvider(name string) (Provider, error)

type Response

type Response struct {
	Body       []byte
	StatusCode int
	Error      error
}

func (Response) GetBody

func (r Response) GetBody() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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