journal

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Seq        uint64                     `json:"seq"`
	Time       time.Time                  `json:"time"`
	Service    string                     `json:"service"`
	Claim      string                     `json:"claim,omitempty"`
	Generation string                     `json:"generation,omitempty"`
	Type       string                     `json:"type"`
	Token      shiftlock.FencingToken     `json:"fencing_token,omitempty"`
	Reason     shiftlock.TransitionReason `json:"reason,omitempty"`
	OpID       shiftlock.OperationID      `json:"operation_id,omitempty"`
	Attrs      map[string]string          `json:"attrs,omitempty"`
}

Entry is a sanitized ownership history record (no secrets).

type Journal

type Journal interface {
	Append(ctx context.Context, e Entry) error
	Read(ctx context.Context, fromSeq uint64, limit int) ([]Entry, error)
	Export(ctx context.Context, fromSeq uint64) ([]Entry, error)
	Close() error
}

Journal is an append-only ownership event log.

type Observer

type Observer struct {
	J       Journal
	Service string
	// contains filtered or unexported fields
}

Observer adapts a Journal to shiftlock.Observer.

func (*Observer) OnEvent

func (o *Observer) OnEvent(e shiftlock.Event)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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