Help us shape the future of Go! Take the 2026 Go Developer Survey

collect

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func New

func New(processor Processor, opts *Options) (*Collector, error)

func (*Collector) Add

func (c *Collector) Add(target *SnapshotTarget, content []byte) (*Snapshot, error)

func (*Collector) Collect

func (c *Collector) Collect(target *SnapshotTarget) error

func (*Collector) Get

func (c *Collector) Get(id string) (io.ReadCloser, error)

func (*Collector) List

func (c *Collector) List() []*Entry

type Entry

type Entry struct {
	Snapshot *Snapshot
	Status   Status
	Message  string
}

type Options

type Options struct {
	Type string
	Ext  string

	Store    storage.Storage
	EventHub *event.Hub
}

type Processor

type Processor interface {
	Process(snapshot *Snapshot) (io.ReadCloser, error)
	Cacheable() bool
}

type Snapshot

type Snapshot struct {
	*SnapshotMeta
	*SnapshotTarget
	// contains filtered or unexported fields
}

func (*Snapshot) Add

func (s *Snapshot) Add(content []byte) error

func (*Snapshot) BodyPath

func (s *Snapshot) BodyPath() (string, error)

func (*Snapshot) Collect

func (s *Snapshot) Collect() error

func (*Snapshot) Prune

func (s *Snapshot) Prune() error

type SnapshotMeta

type SnapshotMeta struct {
	Type       string
	ID         string
	Datetime   time.Time
	Repository *git.RepositoryInfo
}

type SnapshotTarget

type SnapshotTarget struct {
	GroupId  string
	Label    string
	URL      string
	Duration int
}

type Status

type Status string
const (
	StatusOk      Status = "ok"
	StatusFail    Status = "fail"
	StatusPending Status = "pending"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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