Documentation ¶
Index ¶
- type AckPayload
- type Command
- type CreateQueuePayload
- type DeleteQueuePayload
- type DequeuePayload
- type EnqueuePayload
- type FSM
- type FSMResponse
- type FSMSnapshot
- type NackPayload
- type Node
- func (n *Node) Ack(QueueName string, id uint64) error
- func (n *Node) CreateQueue(queueType, queueName string) error
- func (n *Node) DeleteQueue(queueName string) error
- func (n *Node) Dequeue(QueueName string, ack bool) (*queue.Message, error)
- func (n *Node) Enqueue(queueName string, group string, priority int64, content string) (*queue.Message, error)
- func (node *Node) GenerateID() uint64
- func (n *Node) GetByID(id uint64) (*queue.Message, error)
- func (n *Node) GetQueueInfo(queueName string) (*queue.QueueInfo, error)
- func (n *Node) GetQueues() []*queue.QueueInfo
- func (node *Node) InitIDGenerator() error
- func (node *Node) Initialize()
- func (n *Node) IsLeader() bool
- func (n *Node) Join(nodeID, addr string) error
- func (n *Node) Leader() string
- func (node *Node) ListenToLeaderChanges()
- func (node *Node) PrometheusRegistry() prometheus.Registerer
- func (node *Node) SetLeaderChangeFunc(leaderChangeFn func(bool))
- func (n *Node) UpdatePriority(queueName string, id uint64, priority int64) error
- type UpdatePriorityPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckPayload ¶ added in v0.1.14
type Command ¶
type Command struct { Op string `json:"op"` Payload interface{} `json:"payload"` }
func (Command) MarshalJSON ¶ added in v0.1.14
Custom marshal logic to encode the dynamic payload
func (*Command) UnmarshalJSON ¶ added in v0.1.14
Custom unmarshal logic to decode the dynamic payload based on the "op" field
type CreateQueuePayload ¶ added in v0.1.14
type DeleteQueuePayload ¶ added in v0.1.14
type DeleteQueuePayload struct {
QueueName string `json:"queue_name"`
}
type DequeuePayload ¶ added in v0.1.14
type EnqueuePayload ¶ added in v0.1.14
type FSMResponse ¶
type FSMSnapshot ¶
type FSMSnapshot struct { NodeID string // contains filtered or unexported fields }
func (*FSMSnapshot) Persist ¶
func (f *FSMSnapshot) Persist(sink raft.SnapshotSink) error
func (*FSMSnapshot) Release ¶
func (f *FSMSnapshot) Release()
type NackPayload ¶ added in v0.1.14
type Node ¶
type Node struct { Raft *raft.Raft QueueManager *queue.QueueManager // contains filtered or unexported fields }
func (*Node) CreateQueue ¶
func (*Node) DeleteQueue ¶
func (*Node) GenerateID ¶ added in v0.1.14
func (*Node) GetQueueInfo ¶ added in v0.2.0
func (*Node) InitIDGenerator ¶ added in v0.1.14
func (*Node) Initialize ¶
func (node *Node) Initialize()
func (*Node) ListenToLeaderChanges ¶
func (node *Node) ListenToLeaderChanges()
func (*Node) PrometheusRegistry ¶ added in v0.2.0
func (node *Node) PrometheusRegistry() prometheus.Registerer
func (*Node) SetLeaderChangeFunc ¶
type UpdatePriorityPayload ¶ added in v0.1.14
Click to show internal directories.
Click to hide internal directories.