Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultAttributeLoadingSetting = false ClusterAddressTTL = 30 * time.Minute )
Variables ¶
View Source
var Counters = []prometheus.CounterDefinition{
{
Name: rollCallsSeenMetric,
Help: "Number of roll calls seen by the node.",
},
{
Name: rollCallsAppliedMetric,
Help: "Number of roll calls this node applied to.",
},
{
Name: workOrderMetric,
Help: "Number of work orders.",
},
}
View Source
var DefaultConfig = Config{ LoadAttributes: DefaultAttributeLoadingSetting, MetadataProvider: metadata.NewNoopProvider(), }
DefaultConfig represents the default settings for the node.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Workspace string // Directory where we can store files needed for execution.
LoadAttributes bool // Node should try to load its attributes from IPFS.
MetadataProvider metadata.Provider // Metadata provider for the node
}
Config represents the Node configuration.
type FStore ¶
type FStore interface {
// Install will install a function based on the address and CID.
Install(ctx context.Context, address string, cid string) error
// IsInstalled returns info if the function is installed or not.
IsInstalled(cid string) (bool, error)
// TODO: Refactor the sync code - move the logic outside of the package
// Sync will ensure function installations are correct, redownloading functions if needed.
Sync(ctx context.Context, haltOnError bool) error
}
FStore provides retrieval of function manifest.
type Option ¶
type Option func(*Config)
Option can be used to set Node configuration options.
func AttributeLoading ¶
AttributeLoading specifies whether node should try to load its attributes data from IPFS.
func MetadataProvider ¶
MetadataProvider sets the metadata provider for the node.
Click to show internal directories.
Click to hide internal directories.