gateway

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpniServicesName = "opni"
	OpniS3SecretName = "opni-s3-credentials"
	AccessKeyKey     = "accessKey"
	SecretKeyKey     = "secretKey"
)

Variables

View Source
var (
	DefaultModelSources = map[pretrainedModelType]*string{
						// contains filtered or unexported fields
	}
	ModelHyperParameters = map[pretrainedModelType]map[string]intstr.IntOrString{
							// contains filtered or unexported fields
	}
)

Functions

func Scheme

func Scheme(ctx context.Context) meta.Scheme

Types

type AIOpsPlugin

type AIOpsPlugin struct {
	PluginOptions
	modeltraining.UnsafeModelTrainingServer
	admin.UnsafeAIAdminServer
	system.UnimplementedSystemPluginClient

	Logger *slog.Logger
	// contains filtered or unexported fields
}

func NewPlugin

func NewPlugin(ctx context.Context, opts ...PluginOption) *AIOpsPlugin

func (*AIOpsPlugin) ClusterWorkloadAggregation

func (p *AIOpsPlugin) ClusterWorkloadAggregation(ctx context.Context, in *corev1.Reference) (*modeltraining.WorkloadAggregationList, error)

func (*AIOpsPlugin) DeleteAISettings

func (s *AIOpsPlugin) DeleteAISettings(ctx context.Context, options *admin.DeleteOptions) (*emptypb.Empty, error)

func (*AIOpsPlugin) DoUpgrade

func (s *AIOpsPlugin) DoUpgrade(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (*AIOpsPlugin) GPUInfo

func (*AIOpsPlugin) GetAISettings

func (s *AIOpsPlugin) GetAISettings(ctx context.Context, _ *emptypb.Empty) (*admin.AISettings, error)

func (*AIOpsPlugin) GetModelStatus

func (p *AIOpsPlugin) GetModelStatus(ctx context.Context, _ *emptypb.Empty) (*modeltraining.ModelStatus, error)

func (*AIOpsPlugin) GetModelTrainingParameters

func (p *AIOpsPlugin) GetModelTrainingParameters(ctx context.Context, _ *emptypb.Empty) (*modeltraining.ModelTrainingParametersList, error)

func (*AIOpsPlugin) GetRuntimeClasses

func (s *AIOpsPlugin) GetRuntimeClasses(ctx context.Context, _ *emptypb.Empty) (*admin.RuntimeClassResponse, error)

func (*AIOpsPlugin) LaunchAIServices added in v0.9.1

func (p *AIOpsPlugin) LaunchAIServices(ctx context.Context) (*emptypb.Empty, error)

func (*AIOpsPlugin) PutAISettings

func (s *AIOpsPlugin) PutAISettings(ctx context.Context, settings *admin.AISettings) (*emptypb.Empty, error)

func (*AIOpsPlugin) PutModelTrainingStatus

func (p *AIOpsPlugin) PutModelTrainingStatus(ctx context.Context, in *modeltraining.ModelStatus) (*emptypb.Empty, error)

func (*AIOpsPlugin) UpgradeAvailable

func (s *AIOpsPlugin) UpgradeAvailable(ctx context.Context, _ *emptypb.Empty) (*admin.UpgradeAvailableResponse, error)

func (*AIOpsPlugin) UseManagementAPI

func (p *AIOpsPlugin) UseManagementAPI(_ managementv1.ManagementClient)

type Aggregations

type Aggregations struct {
	ByCluster map[string]*ClusterAggregation `json:",inline,omitEmpty"`
}

func (*Aggregations) Add

func (a *Aggregations) Add(bucket Bucket)

type AggregationsSpec

type AggregationsSpec struct {
	Bucket BucketSpec `json:"bucket"`
}

type Bucket

type Bucket struct {
	Key      Key `json:"key"`
	DocCount int `json:"doc_count"`
}

type BucketSpec

type BucketSpec struct {
	AfterKey *Key     `json:"after_key"`
	Buckets  []Bucket `json:"buckets"`
}

type ClusterAggregation

type ClusterAggregation struct {
	ByNamespace map[string]*NamespaceAggregation `json:",inline,omitEmpty"`
}

type DeploymentLogCount

type DeploymentLogCount struct {
	DeploymentName string `json:"deployment_name"`
	Count          int    `json:"doc_count"`
}

type Key

type Key struct {
	ClusterID      string `json:"cluster_id"`
	NamespaceName  string `json:"namespace_name"`
	DeploymentName string `json:"deployment_name"`
}

type ModelTrainingParameters added in v0.9.1

type ModelTrainingParameters struct {
	UUID      string                         `json:"uuid,omitempty"`
	Workloads map[string]map[string][]string `json:"workloads,omitempty"`
}

type NamespaceAggregation

type NamespaceAggregation struct {
	ByDeployment map[string]*DeploymentLogCount `json:",inline,omitEmpty"`
}

type PluginOption

type PluginOption func(*PluginOptions)

func WithNamespace

func WithNamespace(namespace string) PluginOption

func WithOpensearchCluster

func WithOpensearchCluster(cluster *opnimeta.OpensearchClusterRef) PluginOption

func WithRestConfig

func WithRestConfig(restconfig *rest.Config) PluginOption

func WithVersion

func WithVersion(version string) PluginOption

type PluginOptions

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

type SearchResponse

type SearchResponse struct {
	Aggregations AggregationsSpec `json:"aggregations"`
}

Jump to

Keyboard shortcuts

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