stream

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseFunc

type CloseFunc func()

CloseFunc is a Context Close function

type Context

type Context interface {
	// Close closes the stream. The stream channel will be closed and resources used by the
	// stream will be released.
	Close()
}

Context is a stream context

func NewCancelContext

func NewCancelContext(cancel context.CancelFunc) Context

NewCancelContext creates a new stream context from a context CancelFunc

func NewContext

func NewContext(close CloseFunc) Context

NewContext creates a new context with a close function

type Event

type Event struct {
	// Type is the stream event type
	Type EventType

	// Object is the event object
	Object interface{}
}

Event is a stream event

type EventType

type EventType string

EventType is a stream event type

const (
	// None indicates an object was not changed
	None EventType = ""
	// Created indicates an object was created
	Created EventType = "Created"
	// Updated indicates an object was updated
	Updated EventType = "Updated"
	// Deleted indicates an object was deleted
	Deleted EventType = "Deleted"
)

Jump to

Keyboard shortcuts

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