Documentation ¶
Index ¶
- Constants
- type DeltaStatHostCPUUsageValue
- type DeltaStatHostMemoryUsageValue
- type DeltaStatHostUsageValue
- type Flow
- func (f *Flow) Close() error
- func (f *Flow) DeltaStats() []astikit.DeltaStat
- func (f *Flow) Emit(n astikit.EventName, payload interface{})
- func (f *Flow) Groups() (groups []*Group)
- func (f *Flow) ID() uint64
- func (f *Flow) Logger() astikit.CompleteLogger
- func (f *Flow) Metadata() Metadata
- func (f *Flow) NewGroup(o GroupOptions) (g *Group, err error)
- func (f *Flow) On(n astikit.EventName, h astikit.EventHandler) astikit.EventRemover
- func (f *Flow) Start(ctx context.Context) error
- func (f *Flow) Status() Status
- func (f *Flow) Stop() error
- func (f *Flow) String() string
- type FlowOptions
- type Group
- func (g *Group) Close() error
- func (g *Group) Context() context.Context
- func (g *Group) DisconnectNodes()
- func (g *Group) Emit(nm astikit.EventName, payload interface{})
- func (g *Group) ID() uint64
- func (g *Group) Metadata() Metadata
- func (g *Group) NewNode(o NodeOptions) (n *Node, c *astikit.Closer, err error)
- func (g *Group) Nodes() (nodes []*Node)
- func (g *Group) On(nm astikit.EventName, h astikit.EventHandler) astikit.EventRemover
- func (g *Group) Start() error
- func (g *Group) Status() Status
- func (g *Group) Stop() error
- func (g *Group) String() string
- type GroupOptions
- type Metadata
- type Node
- func (n *Node) Children() []*Node
- func (n *Node) Connector() *NodeConnector
- func (n *Node) Emit(nm astikit.EventName, payload interface{})
- func (n *Node) ID() uint64
- func (n *Node) Metadata() Metadata
- func (n *Node) Noder() Noder
- func (n *Node) On(nm astikit.EventName, h astikit.EventHandler) astikit.EventRemover
- func (n *Node) Parents() []*Node
- func (n *Node) Status() Status
- func (n *Node) String() string
- type NodeConnector
- type NodeOptions
- type NodeStopOptions
- type Noder
- type Plugin
- type Status
Constants ¶
View Source
const ( EventNameFlowClosed astikit.EventName = "astiflow.flow.closed" EventNameFlowDone astikit.EventName = "astiflow.flow.done" EventNameFlowRunning astikit.EventName = "astiflow.flow.running" EventNameFlowStarting astikit.EventName = "astiflow.flow.starting" EventNameFlowStopping astikit.EventName = "astiflow.flow.stopping" EventNameGroupClosed astikit.EventName = "astiflow.group.closed" EventNameGroupCreated astikit.EventName = "astiflow.group.created" EventNameGroupDone astikit.EventName = "astiflow.group.done" EventNameGroupRunning astikit.EventName = "astiflow.group.running" EventNameGroupStarting astikit.EventName = "astiflow.group.starting" EventNameGroupStopping astikit.EventName = "astiflow.group.stopping" EventNameNodeChildAdded astikit.EventName = "astiflow.node.child.added" EventNameNodeChildRemoved astikit.EventName = "astiflow.node.child.removed" EventNameNodeClosed astikit.EventName = "astiflow.node.closed" EventNameNodeCreated astikit.EventName = "astiflow.node.created" EventNameNodeDone astikit.EventName = "astiflow.node.done" EventNameNodeParentAdded astikit.EventName = "astiflow.node.parent.added" EventNameNodeParentRemoved astikit.EventName = "astiflow.node.parent.removed" EventNameNodeRunning astikit.EventName = "astiflow.node.running" EventNameNodeStarting astikit.EventName = "astiflow.node.starting" EventNameNodeStopping astikit.EventName = "astiflow.node.stopping" )
View Source
const (
DeltaStatNameHostUsage string = "astiflow.host.usage"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeltaStatHostUsageValue ¶
type DeltaStatHostUsageValue struct { CPU DeltaStatHostCPUUsageValue `json:"cpu"` Memory DeltaStatHostMemoryUsageValue `json:"memory"` }
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
func NewFlow ¶
func NewFlow(o FlowOptions) (f *Flow, err error)
func (*Flow) DeltaStats ¶
func (f *Flow) DeltaStats() []astikit.DeltaStat
type FlowOptions ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) DisconnectNodes ¶
func (g *Group) DisconnectNodes()
func (*Group) NewNode ¶
func (g *Group) NewNode(o NodeOptions) (n *Node, c *astikit.Closer, err error)
type GroupOptions ¶
type GroupOptions struct {
Metadata Metadata
}
type Metadata ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is purposefuly not an interface
func (*Node) Connector ¶
func (n *Node) Connector() *NodeConnector
type NodeConnector ¶
type NodeConnector struct {
// contains filtered or unexported fields
}
NodeConnector's purpose is to provide a way to connect noders belonging to different external packages without exposing the node itself
func (*NodeConnector) Connect ¶
func (src *NodeConnector) Connect(dst *NodeConnector)
func (*NodeConnector) Disconnect ¶
func (src *NodeConnector) Disconnect(dst *NodeConnector)
type NodeOptions ¶
type NodeOptions struct { Metadata Metadata Noder Noder StopOptions *NodeStopOptions }
type NodeStopOptions ¶
type Noder ¶
type Noder interface { DeltaStats() []astikit.DeltaStat Start(ctx context.Context, tc astikit.TaskCreator) }
Noder should be the simplest interface possible, hopefuly only describing the action a node can do Internal node shouldn't be exposed here since we don't want other nodes/packages to be able manipulate it since only the flow owner should be able to do it
Source Files ¶
Click to show internal directories.
Click to hide internal directories.