agent

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartPullerAndProcessModels

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

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