feed

package
v0.175.0-rc.310 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 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

Overview

Package feed is the shape of beekeeper://feed: the events of the shared state, each with an id, in a versioned schema the agent views share.

A change within a schema version only adds optional fields; anything else is a new version, served beside the old one until its readers moved.

Index

Constants

View Source
const Schema = "beekeeper.giantswarm.io/feed/v1"

Schema is the version every feed document names.

Variables

This section is empty.

Functions

func ID

func ID(nanos int64) string

ID is an event's id from its time, in nanoseconds.

func Line

func Line(kind string, actor Party, detail string) string

Line is how an event prints: <kind> (<actor>): <detail>.

Types

type Event

type Event struct {
	// ID orders the events: a decimal string that sorts as a number and
	// only grows, across restarts too. A reader prints the events whose ID
	// is above the last one it printed.
	ID string `json:"id"`
	// Kind is the verb, <area>.<what>: lease.claim, note.answer,
	// message.expired, ...
	Kind string `json:"kind"`
	// Subject is the record the event concerns, <Kind>/<name>, a team's
	// namespace (Namespace/beekeeper-<team>) for one without a record.
	Subject string    `json:"subject"`
	Actor   Party     `json:"actor"`
	Time    time.Time `json:"time"`
	// Line is the event as the local watch and log print it, without the
	// time.
	Line string `json:"line"`
}

Event is one change of the shared state.

type Feed

type Feed struct {
	Schema string  `json:"schema"`
	Events []Event `json:"events"`
	// Gap, on a read after an id, says the instance no longer holds that
	// event nor any older one: events right after it may have aged out
	// unread.
	Gap bool `json:"gap,omitempty"`
}

Feed is the feed resource's document: the most recent events, oldest first.

type Party

type Party struct {
	Name   string `json:"name"`
	Person string `json:"person,omitempty"`
	Team   string `json:"team,omitempty"`
	Host   string `json:"host,omitempty"`
}

Party is who acted: the agent, its person, team and host.

Jump to

Keyboard shortcuts

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