watchimpl

package
v0.0.0-...-b049424 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Interval specifies the interval of second between two loops
	// that check all finetunes in a loop.
	Interval int `json:"interval"`

	// Timeout specifies the time that a finetune can live
	// The unit is second.
	Timeout int `json:"timeout"`

	// MaxWatchNum specifies the max num of finetune
	// which the aicc finetune center can support
	MaxWatchNum int `json:"max_watch_num"`

	Endpoint string `json:"endpoint" required:"true"`
}

func (*Config) SetDefault

func (cfg *Config) SetDefault()

type Watcher

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

Watcher

func NewWatcher

func NewWatcher(
	cfg *Config, as aiccfinetune.AICCFinetune,
) (*Watcher, error)

func (*Watcher) ApplyWatch

func (w *Watcher) ApplyWatch(f func(*watch.FinetuneInfo) error) (err error)

func (*Watcher) Exit

func (w *Watcher) Exit()

func (*Watcher) Run

func (w *Watcher) Run()

Jump to

Keyboard shortcuts

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