coreworld

package
v0.0.0-...-c555478 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultStrategy is the strategy to use if none has been specified.
	DefaultStrategy = "rr"

	// StrictScheduleOpts specifies whether the opts passed into the
	// scheduler must be strictly what we're expecting, and nothing more.
	// If this was false, then we'd allow an opts struct that had a field
	// that wasn't used by the scheduler. This could be useful if we need to
	// migrate to a newer version of the function. It's probably best to
	// keep this strict.
	StrictScheduleOpts = true
)
View Source
const (
	// ModuleName is the prefix given to all the functions in this module.
	ModuleName = "world"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeFunc

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

ExchangeFunc is special function which returns all the values of a given key in the exposed world, and sets it's own.

func (*ExchangeFunc) ArgGen

func (obj *ExchangeFunc) ArgGen(index int) (string, error)

ArgGen returns the Nth arg name for this function.

func (*ExchangeFunc) Close

func (obj *ExchangeFunc) Close() error

Close runs some shutdown code for this function and turns off the stream.

func (*ExchangeFunc) Info

func (obj *ExchangeFunc) Info() *interfaces.Info

Info returns some static info about itself.

func (*ExchangeFunc) Init

func (obj *ExchangeFunc) Init(init *interfaces.Init) error

Init runs some startup code for this function.

func (*ExchangeFunc) Stream

func (obj *ExchangeFunc) Stream() error

Stream returns the changing values that this func has over time.

func (*ExchangeFunc) Validate

func (obj *ExchangeFunc) Validate() error

Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.

type KVLookupFunc

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

KVLookupFunc is special function which returns all the values of a given key in the exposed world. It is similar to exchange, but it does not set a key.

func (*KVLookupFunc) ArgGen

func (obj *KVLookupFunc) ArgGen(index int) (string, error)

ArgGen returns the Nth arg name for this function.

func (*KVLookupFunc) Close

func (obj *KVLookupFunc) Close() error

Close runs some shutdown code for this function and turns off the stream.

func (*KVLookupFunc) Info

func (obj *KVLookupFunc) Info() *interfaces.Info

Info returns some static info about itself.

func (*KVLookupFunc) Init

func (obj *KVLookupFunc) Init(init *interfaces.Init) error

Init runs some startup code for this function.

func (*KVLookupFunc) Stream

func (obj *KVLookupFunc) Stream() error

Stream returns the changing values that this func has over time.

func (*KVLookupFunc) Validate

func (obj *KVLookupFunc) Validate() error

Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.

type SchedulePolyFunc

type SchedulePolyFunc struct {
	Type *types.Type // this is the type of opts used if specified
	// contains filtered or unexported fields
}

SchedulePolyFunc is special function which determines where code should run in the cluster.

func (*SchedulePolyFunc) ArgGen

func (obj *SchedulePolyFunc) ArgGen(index int) (string, error)

ArgGen returns the Nth arg name for this function.

func (*SchedulePolyFunc) Build

func (obj *SchedulePolyFunc) Build(typ *types.Type) error

Build is run to turn the polymorphic, undetermined function, into the specific statically typed version. It is usually run after Unify completes, and must be run before Info() and any of the other Func interface methods are used. This function is idempotent, as long as the arg isn't changed between runs.

func (*SchedulePolyFunc) Close

func (obj *SchedulePolyFunc) Close() error

Close runs some shutdown code for this function and turns off the stream.

func (*SchedulePolyFunc) Info

func (obj *SchedulePolyFunc) Info() *interfaces.Info

Info returns some static info about itself. Build must be called before this will return correct data.

func (*SchedulePolyFunc) Init

func (obj *SchedulePolyFunc) Init(init *interfaces.Init) error

Init runs some startup code for this function.

func (*SchedulePolyFunc) Polymorphisms

func (obj *SchedulePolyFunc) Polymorphisms(partialType *types.Type, partialValues []types.Value) ([]*types.Type, error)

Polymorphisms returns the list of possible function signatures available for this static polymorphic function. It relies on type and value hints to limit the number of returned possibilities.

func (*SchedulePolyFunc) Stream

func (obj *SchedulePolyFunc) Stream() error

Stream returns the changing values that this func has over time.

func (*SchedulePolyFunc) Unify

func (obj *SchedulePolyFunc) Unify(expr interfaces.Expr) ([]interfaces.Invariant, error)

Unify returns the list of invariants that this func produces.

func (*SchedulePolyFunc) Validate

func (obj *SchedulePolyFunc) Validate() error

Validate tells us if the input struct takes a valid form.

Jump to

Keyboard shortcuts

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