store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID        string                    `json:"id"`
	Group     string                    `json:"group"`
	Kind      string                    `json:"kind"`
	Namespace string                    `json:"namespace"`
	Name      string                    `json:"name"`
	Timestamp time.Time                 `json:"time"`
	Operation string                    `json:"operation"`
	UserInfo  authenticationv1.UserInfo `json:"userInfo"`
	Object    []byte                    `json:"object"`
	OldObject []byte                    `json:"oldObject"`
}

func (Event) Key

func (e Event) Key() []byte

func (Event) Marshal

func (e Event) Marshal() ([]byte, error)

func (*Event) String

func (e *Event) String() string

func (*Event) Unmarshal

func (e *Event) Unmarshal(data []byte) error

type Store

type Store interface {
	Observe(ev *Event) error
	List(namespace, kind, name string, maxHistory int) (map[string][]*Event, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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