event

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package event mediates notification between controllers and recorder

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int

Action represents the kind of object change we're notifying

const (
	// Delete is the object deletion Action
	Delete Action = iota

	// Upsert is the update or create Action
	Upsert
)

type Notification

type Notification struct {
	Action Action
	Key    string
	Kind   string
	Object []byte
}

Notification conveys an object delete/upsert notification

type Notifier

type Notifier interface {
	Send(notif *Notification)
	ReadChan() <-chan Notification
}

Notifier mediates notifications between controllers and recorder

type Unbuffered

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

Unbuffered implements Notifier

func New

func New() *Unbuffered

New creates an Unbuffered

func (*Unbuffered) ReadChan

func (n *Unbuffered) ReadChan() <-chan Notification

ReadChan returns a channel to read Notifications from

func (*Unbuffered) Send

func (n *Unbuffered) Send(notif *Notification)

Send sends a notification

Jump to

Keyboard shortcuts

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