Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
func NewBufferMemory ¶
func NewBufferMemory() *Buffer
func NewBufferWindowMemory ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabaseMemory ¶
func NewDatabaseMemory(opts ...DatabaseOption) *Database
type DatabaseOption ¶
type DatabaseOption func(b *Database)
DatabaseOption is a function for creating new db storage with other default values.
func WithLoadFunc ¶
func WithLoadFunc(fun func(ctx context.Context) []schema.Message) DatabaseOption
WithLoadFunc is an option for providing the save func.
func WithSaveFunc ¶
WithSaveFunc is an option for providing the save func.
func WithWindow ¶
func WithWindow(window int) DatabaseOption
WithWindow is an option for providing max item for user message buf.
Click to show internal directories.
Click to hide internal directories.