history

package
v0.5.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryChannel

type HistoryChannel struct {
	*channel.BinaryHistory

	channel.Limit
	// contains filtered or unexported fields
}

func New

func New(log *log.Logger, amount int, appendOnlyFile string, o Output) (*HistoryChannel, error)

func (*HistoryChannel) Add

func (c *HistoryChannel) Add(m channel.Msg)

func (*HistoryChannel) AddLog

func (c *HistoryChannel) AddLog(cl channel.Client, m channel.Msg)

func (*HistoryChannel) Close

func (c *HistoryChannel) Close() error

func (*HistoryChannel) HandleBIN

func (c *HistoryChannel) HandleBIN(cl channel.Client, r channel.BinaryReader) error

func (*HistoryChannel) HandleJSON

func (c *HistoryChannel) HandleJSON(cl channel.Client, r io.Reader) (io.Reader, error)

func (*HistoryChannel) Register

func (c *HistoryChannel) Register(chnl string, s channel.Sender) error

func (*HistoryChannel) Run

func (c *HistoryChannel) Run() error

type Log

type Log struct {
	From  channel.Client
	Stamp time.Time
	Msg   channel.Msg
	channel.NeverEqual
	channel.NoClose
}

func (Log) Binary

func (l Log) Binary(w channel.BinaryWriter) error

func (Log) FromBinary

func (l Log) FromBinary(r channel.BinaryReader) (channel.Msg, error)

func (Log) FromJSON

func (l Log) FromJSON(r io.Reader) (channel.Msg, io.Reader, error)

func (Log) JSON

func (l Log) JSON(r io.Writer) error

type Output

type Output interface {
	FromHistory(to channel.Client, l Log) ([]channel.Batch, error)
	DecodeHistoryItem(channel.BinaryReader) (channel.Msg, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL