Documentation ¶
Index ¶
- Constants
- type Memory
- func (reg *Memory) IsWaiting(r tb.Recipient) bool
- func (reg *Memory) OutgoingID(recipient string) (int, bool)
- func (reg *Memory) Register(r tb.Recipient, msgID int) uuid.UUID
- func (reg *Memory) RequestFor(r tb.Recipient, msgID int) (uuid.UUID, bool)
- func (reg *Memory) RequestInfo(r tb.Recipient, msgID int) (string, time.Time)
- func (reg *Memory) SetValue(recipient string, value string)
- func (reg *Memory) StopWait(r tb.Recipient) int
- func (reg *Memory) Unregister(r tb.Recipient, msgID int)
- func (reg *Memory) Value(recipient string) (string, bool)
- func (reg *Memory) Wait(r tb.Recipient, outboundID int)
- func (reg *Memory) WaitMsgID(r tb.Recipient) int
Constants ¶
View Source
const (
Unknown = "[unknown]"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory holds the state of the user interaction in-memory.
func NewMemRegistry ¶
func NewMemRegistry() *Memory
NewMemRegistry initialises new in-memory message and user registry.
func (*Memory) OutgoingID ¶
OutgoingID returns the controller's outgoing message ID for the user.
func (*Memory) RequestFor ¶
RequestFor returns a request id for message ID and a bool. Bool will be true if message is registered and false otherwise.
func (*Memory) RequestInfo ¶
RequestInfo returns a request ID (or <unknown>) and a time of the request (or zero time) by calling parsing functions of the UUID instance.
func (*Memory) Unregister ¶
Unregister removes the request from cache.
Click to show internal directories.
Click to hide internal directories.