Documentation ¶
Index ¶
- type ChannelOperatorInterface
- type GenOp
- func (g GenOp) Create(ctx context.Context, scope string, channel *meta.Channel) error
- func (g GenOp) Delete(ctx context.Context, scope, name string) error
- func (g GenOp) Get(ctx context.Context, scope, name string) (*meta.Channel, error)
- func (g GenOp) Update(ctx context.Context, scope string, channel *meta.Channel) error
- type NodeOperatorInterface
- type Operator
- type OperatorInterface
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, scope string, name string) (*meta.Channel, error) Create(ctx context.Context, scope string, channel *meta.Channel) error Update(ctx context.Context, scope string, channel *meta.Channel) error Delete(ctx context.Context, scope 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 GenOp ¶
type GenOp struct {
// contains filtered or unexported fields
}
GenOp is a general channel operator for dinamically selecting required operator
func NewGeneralOperator ¶
NewGeneralOperator creates an instance of GenOp for a given broker and memory manager
func (GenOp) Create ¶
Create executes Create method of correct operator given the desired channel's broker
func (GenOp) Delete ¶
Delete executes Delete method of correct operator given the desired channel's broker
type NodeOperatorInterface ¶
type NodeOperatorInterface interface { CreateNode(ctx context.Context, app *meta.App) (*meta.Node, error) UpdateNode(ctx context.Context, app *meta.App) (*meta.Node, error) DeleteNode(ctx context.Context, scope string, name string) error }
NodeOperatorInterface is the interface that allows to obtain or change node information inside a deployment
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator is an operator for creating channels and nodes inside kubernetes that communicate via Sidecars. The operators need two environment variables
func (*Operator) Channels ¶
func (op *Operator) Channels() ChannelOperatorInterface
Channels returns the Channels Operator Interface for a given node
func (*Operator) Nodes ¶
func (op *Operator) Nodes() NodeOperatorInterface
Nodes returns the nodes that communicate via sidecars inside kubernetes
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.
func NewOperator ¶
NewOperator creates a node operator.