providers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIError = errors.New("API error")
View Source
var ErrUnsupportedProvider = errors.New("unsupported provider")

Functions

func HttpReq

func HttpReq(ctx context.Context, method, url string, headers map[string]string) (string, error)

func ParseInstanceOutput

func ParseInstanceOutput(buff *bytes.Buffer) (map[string]string, error)

func ParsePdshOutput

func ParsePdshOutput(buff *bytes.Buffer, direct bool) (map[string]string, error)

func ReadFile

func ReadFile(path string) (string, error)

Types

type Config

type Config struct {
	Creds  map[string]string
	Params map[string]any
}

type Loader

type Loader = component.Loader[Provider, Config]

type NamedLoader

type NamedLoader = component.NamedLoader[Provider, Config]

type Provider

type Provider interface {
	GenerateTopologyConfig(ctx context.Context, pageSize *int, instances []topology.ComputeInstances) (*topology.Vertex, error)
}

type Registry

type Registry component.Registry[Provider, Config]

func NewRegistry

func NewRegistry(namedLoaders ...NamedLoader) Registry

func (Registry) Get

func (r Registry) Get(name string) (Loader, error)

type SimulationParams

type SimulationParams struct {
	ModelPath string `mapstructure:"model_path"`
	APIError  int    `mapstructure:"api_error"`
}

func GetSimulationParams

func GetSimulationParams(params map[string]any) (*SimulationParams, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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