localstorage

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor interface {
	IDs() (machineID, sessionID int64)
	Next(context.Context) bool
	Event() *typesv1.LogEvent
	Err() error
}

type MemSinkCursor

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

func (*MemSinkCursor) Err

func (crs *MemSinkCursor) Err() error

func (*MemSinkCursor) Event

func (crs *MemSinkCursor) Event() *typesv1.LogEvent

func (*MemSinkCursor) IDs

func (crs *MemSinkCursor) IDs() (machineID, sessionID int64)

func (*MemSinkCursor) Next

func (crs *MemSinkCursor) Next(ctx context.Context) bool

type MemStorage

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

func NewMemStorage

func NewMemStorage() *MemStorage

func (*MemStorage) Heartbeat

func (str *MemStorage) Heartbeat(ctx context.Context, machineID, sessionID int64) (time.Duration, error)

func (*MemStorage) Query

func (str *MemStorage) Query(ctx context.Context, q *typesv1.LogQuery) ([]Cursor, error)

func (*MemStorage) SinkFor

func (str *MemStorage) SinkFor(machineID, sessionID int64) (sink.Sink, time.Duration, error)

type MemStorageSink

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

func (*MemStorageSink) Flush

func (snk *MemStorageSink) Flush(ctx context.Context) error

func (*MemStorageSink) Receive

func (snk *MemStorageSink) Receive(ctx context.Context, ev *typesv1.LogEvent) error

func (*MemStorageSink) ReceiveBatch

func (snk *MemStorageSink) ReceiveBatch(ctx context.Context, evs []*typesv1.LogEvent) error

type Queryable

type Queryable interface {
	Query(context.Context, *typesv1.LogQuery) ([]Cursor, error)
}

type SinkID

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

type Storage

type Storage interface {
	Queryable
	SinkFor(machineID, sessionID int64) (_ sink.Sink, heartbeatIn time.Duration, _ error)
	Heartbeat(ctx context.Context, machineID, sessionID int64) (time.Duration, error)
}

type SummarizedEvents

type SummarizedEvents struct {
	BucketWidth time.Duration
	Buckets     []struct {
		Time       time.Time
		EventCount int
	}
}

Jump to

Keyboard shortcuts

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