reportfeed

package
v0.0.0-...-3728fe3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sanitise

func Sanitise(s string) string

Sanitise edits a string, replacing some dangerous HTML characters.

Types

type Buffer

type Buffer struct {
	Timestamp     time.Time
	Source        uint64
	Content       *[]byte
	ContentLength int
}

Buffer contains an input or output buffer.

type ReportFeed

type ReportFeed struct {

	// RecentMessages contains the messages recently sent.
	RecentMessages *circularQueue.CircularQueue

	*sync.Mutex
	// contains filtered or unexported fields
}

ReportFeed satisfies the status-reporter ReportFeedT interface.

func New

New creates and returns a new ReportFeed object. The ReportFeed object contains a pointer to a mutex so always use this method to create one.

func (*ReportFeed) RecordClientBuffer

func (rf *ReportFeed) RecordClientBuffer(buffer *[]byte, source uint64, length int)

RecordClientBuffer takes a timestamped copy of a client buffer.

func (*ReportFeed) RecordServerBuffer

func (rf *ReportFeed) RecordServerBuffer(buffer *[]byte, source uint64, length int)

RecordServerBuffer takes a timestamped copy of a server buffer.

func (*ReportFeed) SetLogLevel

func (rf *ReportFeed) SetLogLevel(level uint8)

SetLogLevel satisfies the ReportFeedT interface.

func (*ReportFeed) SetLogger

func (rf *ReportFeed) SetLogger(logger *dailylogger.Writer)

SetLogger sets the logger.

func (*ReportFeed) Status

func (rf *ReportFeed) Status() []byte

Status satisfies the ReportFeedT interface.

Jump to

Keyboard shortcuts

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