agent

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 19 Imported by: ? 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

func StartPullerAndProcessModels added in v0.6.0

func StartPullerAndProcessModels(downloader *Downloader, commands <-chan ModelOp, logger *zap.SugaredLogger)

func SyncModelDir

func SyncModelDir(modelDir string, logger *zap.SugaredLogger) (map[string]modelWrapper, error)

Types

type Downloader

type Downloader struct {
	ModelDir string

	Providers map[storage.Protocol]storage.Provider
	Logger    *zap.SugaredLogger
	// contains filtered or unexported fields
}

func (*Downloader) DownloadModel

func (d *Downloader) DownloadModel(modelName string, modelSpec *v1alpha1.ModelSpec) error

type FileError

type FileError error
var NoSuccessFile FileError = fmt.Errorf("no success file can be found")

type ModelChannel

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

type ModelOp

type ModelOp struct {
	OnStartup bool
	ModelName string
	Op        OpType
	Spec      *v1.ModelSpec
}

type OpType

type OpType string
const (
	Add    OpType = "Add"
	Remove OpType = "Remove"
)

type Puller

type Puller struct {
	Downloader *Downloader
	// contains filtered or unexported fields
}

type WaitGroupWrapper added in v0.6.0

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

type Watcher

type Watcher struct {
	ModelTracker map[string]modelWrapper
	ModelEvents  chan ModelOp
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(configDir string, modelDir string, logger *zap.SugaredLogger) Watcher

func (*Watcher) Start

func (w *Watcher) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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