bundle

package
v0.0.0-...-c8a8185 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollingMinDelaySeconds int64 = 60
	DefaultPollingMaxDelaySeconds int64 = 120
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	Name        string
	Logger      logger.Logger
	Store       store.Store
	Webhooks    []string
	Subscribers []string
	Publishers  []publisher.Publisher
	Deployers   []deployer.Deployer
	Config      *config.Bundle
	// contains filtered or unexported fields
}

func (*Bundle) Activate

func (b *Bundle) Activate() error

Activate sets up the bundle, performs the initial build, and by default starts polling the store and rebuilding periodically

func (*Bundle) Data

func (b *Bundle) Data() []byte

Data returns the bundle data

func (*Bundle) Deactivate

func (b *Bundle) Deactivate() error

Deactivate stops the polling loop and sets the bundle to deactivated

func (*Bundle) Etag

func (b *Bundle) Etag() string

Etag returns the bundle's etag which is the md5 sum of its contents

func (*Bundle) Rebuild

func (b *Bundle) Rebuild(ctx context.Context) error

Rebuild rebuilds the bundle. Becuase requests to this function are made asynchronously At most 1 call be will queued up during execution. This ensures that any calls made to rebuild during a rebuild operation will still be processed but will be combined into a single queued up rebuild instead of n-rebuilds

Jump to

Keyboard shortcuts

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