components

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: BSD-3-Clause Imports: 6 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Add(Serviceable) (Serviceable, error)
	Get(MatchDefinition) ([]Serviceable, error)
	Remove(Serviceable)
	Validate(serviceables []Serviceable, branch string, tns tns.Client) error
	Close()
}

type Function

type Function interface {
	// Instantiate creates a Function instance for the given Function
	Instantiate(ctx FunctionContext, branch, commit string) (sdk FunctionInstance, runtime vm.Runtime, sdkPlugin interface{}, err error)
}

type FunctionContext

type FunctionContext struct {
	Config      structureSpec.Function
	Project     string
	Application string
}

FunctionContext wraps the methods used for interacting with a WASM function.

type FunctionInstance

type FunctionInstance interface {
	// Function returns the parent Function interface
	Function() Function
	// Call will call the Function on the runtime, with an injected parameter of the event id
	Call(runtime vm.Runtime, id interface{}) error
	// Name returns the name of the Function
	Name() string
}

type MatchDefinition

type MatchDefinition interface {
	String() string
	CachePrefix() string
}

type ServiceComponent

type ServiceComponent interface {
	substrate.Service
	CheckTns(MatchDefinition) ([]Serviceable, error)
	Cache() Cache
}

type Serviceable

type Serviceable interface {
	Match(MatchDefinition) matcherSpec.Index
	Validate(MatchDefinition) error
	Project() (cid.Cid, error)
	Commit() string
	Matcher() MatchDefinition
	Id() string
	Ready() error
	Close()
	Service() ServiceComponent
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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