sync

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKeyNodeName      = "BAETYL_NODE_NAME"
	EnvKeyNodeNamespace = "BAETYL_NODE_NAMESPACE"

	TopicUpside   = "upside"
	TopicDownside = "downside"

	TopicDM = "dm"

	BaetylHookUploadObject = "baetyl_upload_object"
)

Variables

View Source
var Hooks = map[string]interface{}{}

Functions

func DownloadConfig

func DownloadConfig(cli *http.Client, objectPath string, cfg *specv1.Configuration) error

func FilterConfig

func FilterConfig(cfg *specv1.Configuration)

func PrepareApp

func PrepareApp(hostPath, objectPath string, app *specv1.Application, cfgs map[string]specv1.Configuration) error

TODO: move to the right place

Types

type Sync

type Sync interface {
	Start()
	Close()
	Report(r v1.Report) (v1.Desire, error)
	SyncResource(v1.AppInfo) error
	SyncApps(infos []v1.AppInfo) (map[string]v1.Application, error)
}

func NewSync

func NewSync(cfg config.Config, store *bh.Store, nod node.Node) (Sync, error)

NewSync create a new sync

type UploadObjectFunc added in v2.2.0

type UploadObjectFunc func(dir, file, md5, unpack string) error

type WriteCounter added in v2.4.3

type WriteCounter struct {
	Interval time.Duration
	Printer  func(uint64)
	// contains filtered or unexported fields
}

func (*WriteCounter) Write added in v2.4.3

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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