base

package
v1.0.1-0...-20e81f0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//StatusOK status ok
	StatusOK = "ok"
	//StatusError status error
	StatusError = "error"
	//StatusProxy status error
	StatusProxy = "proxy"
	//StatusNoMatch status no match
	StatusNoMatch = "noMatch"
	//StatusNoFound status no found
	StatusNoFound = "notFound"
	//StatusOverflow status overflow
	StatusOverflow = "overflow"

	//StatusPartial partial match (waiting for done marker)
	StatusPartial = "partial"

	//StatusDisabled status disabled
	StatusDisabled = "disabled"

	//StatusPending status pending
	StatusPending = "pending"

	//StatusUnProcess status for unprocessed file
	StatusUnProcess = "unprocessed"

	//SourceAttribute dest attribute
	SourceAttribute = "Source"

	//UnclassifiedStatus
	UnclassifiedStatus = "unclassified"

	//ConfigEnvKey config env key
	ConfigEnvKey = "CONFIG"

	//DestEnvKey destination env key
	DestEnvKey = "DEST"

	//LambdaScheme represents lambda schem
	LambdaScheme = "lambda"

	//YAMLExt yaml extension
	YAMLExt = ".yaml"

	//CloudFunctionScheme represents clud function scheme
	CloudFunctionScheme = "cloudfunction"

	//InMemoryStorageBaseURL in memory storage URL
	InMemoryStorageBaseURL = "mem://localhost/"
)

Variables

This section is empty.

Functions

func IntPtr

func IntPtr(i int) *int

IntPtr returns int pointer

func IsSchemaError

func IsSchemaError(err error) bool

IsSchemaError returns true if schema error

func IsURL

func IsURL(candidate string) bool

IsURL returns true if candidate is URL

Types

type Config

type Config struct {
	URL          string
	Region       string
	ProjectID    string
	SourceScheme string
}

Config represents a base config

func (*Config) Init

func (c *Config) Init()

type Info

type Info struct {
	Workflow          string `json:",omitempty"`
	URL               string
	Description       string `json:",omitempty"`
	ProjectURL        string `json:",omitempty"`
	LeadEngineer      string `json:",omitempty"`
	LeadEngineerEmail string `json:",omitempty"`
	SlackChannel      string `json:",omitempty"`
	SlackUser         string `json:",omitempty"`
}

Info represents meta route information

type Meta

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

func NewMeta

func NewMeta(baeURL string, checkFrequency time.Duration) *Meta

func (*Meta) HasChanged

func (m *Meta) HasChanged(ctx context.Context, fs afs.Service) (bool, error)

HasChanged returns true if resource under base URL have changed

type Replayer

type Replayer struct {
	*sync.WaitGroup
	// contains filtered or unexported fields
}

Replayer represents a asset replayed by re-triggering original even by moving storage operation

func NewReplayer

func NewReplayer(fs afs.Service) *Replayer

NewMover create a mover

func (*Replayer) Run

func (d *Replayer) Run(ctx context.Context, routines int)

Run start mover go routines

func (*Replayer) Schedule

func (d *Replayer) Schedule(URL string)

Schedule scheduler replay

func (*Replayer) Wait

func (d *Replayer) Wait() (err error)

Wait for all replay completion

type SchemaError

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

SchemaError represent schema validation error

func NewSchemaError

func NewSchemaError(err error) *SchemaError

NewSchemaError creates a schema error

func (SchemaError) Error

func (v SchemaError) Error() string

Jump to

Keyboard shortcuts

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