explorer

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feedback

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

Feedback is an implementation of the provision.Feedbacker that u sends results to the TFExplorer: https://github.com/threefoldtech/tfexplorer

func NewFeedback

func NewFeedback(client *client.Client, converter provision.ResultConverterFunc) *Feedback

NewFeedback creates an ExplorerFeedback

func (*Feedback) Deleted

func (e *Feedback) Deleted(nodeID, id string) error

Deleted implements provision.Feedbacker

func (*Feedback) Feedback

func (e *Feedback) Feedback(nodeID string, r *provision.Result) error

Feedback implements provision.Feedbacker

func (*Feedback) UpdateStats

func (e *Feedback) UpdateStats(nodeID string, w directory.WorkloadAmount, u directory.ResourceAmount) error

UpdateStats implements provision.Feedbacker

type Poller

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

Poller is an implementation of the provision.ReservationPoller that retrieve reservation from the TFExplorer: https://github.com/threefoldtech/tfexplorer

func NewPoller

func NewPoller(cl *client.Client, inputConv provision.ReservationConverterFunc, provisionOrder map[provision.ReservationType]int) *Poller

NewPoller returns a reservation poller inputConv is a function used by the provision.Engine to convert date received from the explorer to into the internal type of the system provisionOrder is a map with each primitive type as key. It is used to order the reservation before sending them to the engine.

This can be useful if some workloads in a same reservation depends on each other

func (*Poller) Get added in v0.4.9

func (r *Poller) Get(gwid string) (*provision.Reservation, error)

Get gets a reservation by the global workload id

func (*Poller) Poll

func (r *Poller) Poll(nodeID pkg.Identifier, from uint64) ([]*provision.Reservation, uint64, error)

Poll implements provision.ReservationPoller

Jump to

Keyboard shortcuts

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