update

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStorage

type EventStorage interface {
	storage.Storage

	// SetUpdateStream gives the EventStorage a channel to send events to.
	// The caller is responsible for choosing a large enough buffer to avoid
	// blocking the underlying EventStorage implementation unnecessarily.
	// TODO: In the future maybe enable sending events to multiple listeners?
	SetUpdateStream(UpdateStream)
}

EventStorage is a storage that exposes an UpdateStream.

type ObjectEvent

type ObjectEvent byte

ObjectEvent is an enum describing a change in an Object's state.

const (
	ObjectEventNone   ObjectEvent = iota // 0
	ObjectEventCreate                    // 1
	ObjectEventModify                    // 2
	ObjectEventDelete                    // 3
)

func (ObjectEvent) String

func (o ObjectEvent) String() string

type Update

type Update struct {
	Event         ObjectEvent
	PartialObject runtime.PartialObject
	Storage       storage.Storage
}

Update bundles an FileEvent with an APIType for Storage retrieval.

type UpdateStream

type UpdateStream chan Update

UpdateStream is a channel of updates.

Jump to

Keyboard shortcuts

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