buffer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBuf

type EventBuf interface {
	SubmitEvent(jti string)
	IsClosed() bool
	Close()
	Cnt() int
}

type EventPollBuffer

type EventPollBuffer struct {
	// contains filtered or unexported fields
}

func CreateEventPollBuffer

func CreateEventPollBuffer(initialJtis []string) *EventPollBuffer

CreateEventPollBuffer is intended to queue up events via an in channel. Events can be subsequently retrieved from the buffer using EventPollBuffer.GetEvents()

func (*EventPollBuffer) Close

func (b *EventPollBuffer) Close()

func (*EventPollBuffer) Cnt

func (b *EventPollBuffer) Cnt() float64

func (*EventPollBuffer) GetEvents

func (b *EventPollBuffer) GetEvents(params model.PollParameters) (*[]string, bool)

GetEvents returns all events in the buffer and resets the buffer to empty

func (*EventPollBuffer) IsClosed

func (b *EventPollBuffer) IsClosed() bool

func (*EventPollBuffer) SubmitEvent

func (b *EventPollBuffer) SubmitEvent(jti string)

type EventPushBuffer

type EventPushBuffer struct {
	Out chan interface{}
	// contains filtered or unexported fields
}

func CreateEventPushBuffer

func CreateEventPushBuffer(initialJtis []string) *EventPushBuffer

CreateEventPushBuffer creates an input and output channel that allows events to be queued up (using in channel) for a reader that is sending events one at a time using the Out channel

func (*EventPushBuffer) Close

func (b *EventPushBuffer) Close()

func (*EventPushBuffer) Cnt

func (b *EventPushBuffer) Cnt() float64

func (*EventPushBuffer) IsClosed

func (b *EventPushBuffer) IsClosed() bool

func (*EventPushBuffer) SubmitEvent

func (b *EventPushBuffer) SubmitEvent(jti string)

Jump to

Keyboard shortcuts

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