collect

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 14 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

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 added in v1.1.0

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 added in v1.1.0

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

func (*Snapshot) BodyPath added in v1.0.1

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 added in v1.0.1

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