operators

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelOperatorInterface

type ChannelOperatorInterface interface {
	Get(ctx context.Context, context string, name string) (*meta.Channel, error)
	GetAll(ctx context.Context, context string) ([]*meta.Channel, error)
	Create(ctx context.Context, context string, channel *meta.Channel) error
	Update(ctx context.Context, context string, channel *meta.Channel) error
	Delete(ctx context.Context, context string, name string) error
}

ChannelOperatorInterface is responsible for handling the following methods

  • `Get`: returns a channel from the DApp of the given context
  • `GetAll`: return all channels from the DApp of the given context
  • `Create`: creates a channel in the DApp of the given context
  • `Update`: updates a channel in the DApp of the given context
  • `Delete`: deletes a channel of the specified name in DApp of the given context

type NodeOperatorInterface

type NodeOperatorInterface interface {
	CreateNode(ctx context.Context, app *meta.App) (*meta.Node, error)
	GetNode(ctx context.Context, app *meta.App) (*meta.Node, error)
	UpdateNode(ctx context.Context, app *meta.App) (*meta.Node, error)
	DeleteNode(ctx context.Context, nodeContext string, nodeName string) error
	GetAllNodes() []meta.Node
}

NodeOperatorInterface is the interface that allows to obtain or change node information inside a deployment

type OperatorInterface

type OperatorInterface interface {
	Nodes() NodeOperatorInterface
	Channels() ChannelOperatorInterface
}

OperatorInterface is an interface for inspr runtime operators

To implement the interface you need to create two implementations, a node implementation, that creates nodes from inspr in the given runtime and a channel implementation, that creates channels from inspr in the given runtime.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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