Documentation ¶
Index ¶
- func GetPath(dir, target, replace string) (string, error)
- func NewService(registry *ConfigModelRegistry, cache *plugincache.PluginCache, ...) northbound.Service
- type Config
- type ConfigModelRegistry
- func (r *ConfigModelRegistry) AddModel(model configmodel.ModelInfo) error
- func (r *ConfigModelRegistry) GetModel(name configmodel.Name, version configmodel.Version) (configmodel.ModelInfo, error)
- func (r *ConfigModelRegistry) ListModels() ([]configmodel.ModelInfo, error)
- func (r *ConfigModelRegistry) RemoveModel(name configmodel.Name, version configmodel.Version) error
- type Server
- func (s *Server) DeleteModel(ctx context.Context, request *configmodelapi.DeleteModelRequest) (*configmodelapi.DeleteModelResponse, error)
- func (s *Server) GetModel(ctx context.Context, request *configmodelapi.GetModelRequest) (*configmodelapi.GetModelResponse, error)
- func (s *Server) ListModels(ctx context.Context, request *configmodelapi.ListModelsRequest) (*configmodelapi.ListModelsResponse, error)
- func (s *Server) PushModel(ctx context.Context, request *configmodelapi.PushModelRequest) (*configmodelapi.PushModelResponse, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(registry *ConfigModelRegistry, cache *plugincache.PluginCache, compiler *plugincompiler.PluginCompiler) northbound.Service
NewService :
Types ¶
type Config ¶
type Config struct {
Path string `yaml:"path" json:"path"`
}
Config is a model plugin registry config
type ConfigModelRegistry ¶
type ConfigModelRegistry struct { Config Config // contains filtered or unexported fields }
ConfigModelRegistry is a registry of config models
func NewConfigModelRegistry ¶
func NewConfigModelRegistry(config Config) *ConfigModelRegistry
NewConfigModelRegistry creates a new config model registry
func (*ConfigModelRegistry) AddModel ¶
func (r *ConfigModelRegistry) AddModel(model configmodel.ModelInfo) error
AddModel adds a model to the registry
func (*ConfigModelRegistry) GetModel ¶
func (r *ConfigModelRegistry) GetModel(name configmodel.Name, version configmodel.Version) (configmodel.ModelInfo, error)
GetModel gets a model by name and version
func (*ConfigModelRegistry) ListModels ¶
func (r *ConfigModelRegistry) ListModels() ([]configmodel.ModelInfo, error)
ListModels lists models in the registry
func (*ConfigModelRegistry) RemoveModel ¶
func (r *ConfigModelRegistry) RemoveModel(name configmodel.Name, version configmodel.Version) error
RemoveModel removes a model from the registry
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a registry server
func (*Server) DeleteModel ¶
func (s *Server) DeleteModel(ctx context.Context, request *configmodelapi.DeleteModelRequest) (*configmodelapi.DeleteModelResponse, error)
DeleteModel :
func (*Server) GetModel ¶
func (s *Server) GetModel(ctx context.Context, request *configmodelapi.GetModelRequest) (*configmodelapi.GetModelResponse, error)
GetModel :
func (*Server) ListModels ¶
func (s *Server) ListModels(ctx context.Context, request *configmodelapi.ListModelsRequest) (*configmodelapi.ListModelsResponse, error)
ListModels :
func (*Server) PushModel ¶
func (s *Server) PushModel(ctx context.Context, request *configmodelapi.PushModelRequest) (*configmodelapi.PushModelResponse, error)
PushModel :
Click to show internal directories.
Click to hide internal directories.