Documentation
¶
Index ¶
- type Bindings
- type Event
- func NewErrorCluster(msg string) (e *Event)
- func NewErrorNode(msg string) (e *Event)
- func NewErrorPipeline(name string, msg string) (e *Event)
- func NewInfoCluster(msg string) (e *Event)
- func NewInfoNode(msg string) (e *Event)
- func NewInfoPipeline(name string, msg string) (e *Event)
- func NewWarnCluster(msg string) (e *Event)
- func NewWarnNode(msg string) (e *Event)
- func NewWarnPipeline(name string, msg string) (e *Event)
- type MessageType
- type Model
- type PipelineBind
- type RegisterNode
- type ResourceType
- type Type
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
K string `json:"key" redis:"key"`
Type Type `json:"type" redis:"type"`
ResourceType ResourceType `json:"resource_type" redis:"resource_type"`
ResourceName string `json:"resource_name" redis:"resource_name"`
FirstTime time.Time `json:"first_time" redis:"first_time"`
LastTime time.Time `json:"last_time" redis:"last_time"`
Count int `json:"count" redis:"count"`
MessageType MessageType `json:"type_message" redis:"type_message"`
Message string `json:"message" redis:"message"`
NodeName string `json:"node_name" redis:"node_name"`
NodeIP net.IP `json:"node_ip" redis:"node_ip"`
}
Event generated by pipelines and nodes in the cluster. Events include common information and error information, which can be easily located when an error occurs
func NewErrorCluster ¶
NewErrorCluster returns a new cluster error event
func NewErrorNode ¶
NewErrorNode returns a new node error event
func NewErrorPipeline ¶
NewErrorPipeline returns a new pipeline error event
func NewInfoCluster ¶
NewInfoCluster returns a new cluster info event
func NewInfoNode ¶
NewInfoNode returns a new node event of info level
func NewInfoPipeline ¶
NewInfoPipeline returns a new pipeline info event
func NewWarnCluster ¶
NewWarnCluster returns a new cluster warn event
func NewWarnNode ¶
NewWarnNode returns a new node warn event
func NewWarnPipeline ¶
NewWarnPipeline returns a new pipeline warn event
type MessageType ¶
type MessageType = string
MessageType todo
const ( // MSG_EMPTY default type MSG_EMPTY MessageType = "" )
type PipelineBind ¶
type PipelineBind struct {
Bindings Bindings `json:"bindings" redis:"bindings"`
}
PipelineBind pipeline bind the node will watch pipeline bind, run pipeline instance if node get the bind, stop instance if node lost bind
func (*PipelineBind) Key ¶
func (s *PipelineBind) Key() (key string)
Key generate etcd prefix of pipeline bind
func (*PipelineBind) Unmarshal ¶
func (s *PipelineBind) Unmarshal(val []byte) (err error)
Unmarshal generate pipeline bind from json data
func (*PipelineBind) Val ¶
func (s *PipelineBind) Val() (val string)
Val marshal pipeline bind to json data
type RegisterNode ¶
type RegisterNode struct {
Name string `json:"name" redis:"name"`
}
func (*RegisterNode) Key ¶
func (s *RegisterNode) Key() string
func (*RegisterNode) Unmarshal ¶
func (s *RegisterNode) Unmarshal(data []byte) error
func (*RegisterNode) Val ¶
func (s *RegisterNode) Val() string
type ResourceType ¶
type ResourceType = string
ResourceType pipeline or node or etc.
const ( // PIPELINE resource type PIPELINE ResourceType = "pipeline" // ResourceType resource type NODE ResourceType = "node" // CLUSTER resource type CLUSTER ResourceType = "cluster" )