Documentation ¶
Overview ¶
Package hastack aims to share a thread-safe FIFO Stack across multiple hosts. HA Stack use Redis as backend and helps you to push and pop elements in your stack. See https://github.com/fsamin/go-hastack for sample usages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. Hastack uses Redis ad backend and ensures thread-safe access to enable high availability capacities Import this as dependencies to manage a thread-safe FIFO Stack across multiple hosts
func (*Stack) InboxLength ¶
InboxLength returns size of pending message
func (*Stack) OutboxLength ¶
OutboxLength returns size of computed message