Documentation
¶
Index ¶
Constants ¶
View Source
const (
AnnotationDomain = "ai.tensorchord.domain"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PtyHandler ¶
type PtyHandler interface {
io.Reader
io.Writer
remotecommand.TerminalSizeQueue
}
type Runtime ¶
type Runtime interface {
// build
BuildList(ctx context.Context, namespace string) ([]types.Build, error)
BuildCreate(ctx context.Context, req types.Build, inference *v2alpha1.Inference, builderImage,
buildkitdAddress, buildCtlBin, secret string) error
BuildGet(ctx context.Context, namespace, buildName string) (types.Build, error)
// cache
ImageCacheCreate(ctx context.Context, req types.ImageCache, inference *modelzetes.Inference) error
// inference
InferenceCreate(ctx context.Context,
req types.InferenceDeployment, cfg config.IngressConfig, event string, serverPort int) error
InferenceDelete(ctx context.Context, namespace, inferenceName, ingressNamespace, event string) error
InferenceExec(ctx *gin.Context, namespace, instance string, commands []string, tty bool) error
InferenceGet(namespace, inferenceName string) (*types.InferenceDeployment, error)
InferenceGetCRD(namespace, name string) (*apis.Inference, error)
InferenceInstanceList(namespace, inferenceName string) ([]types.InferenceDeploymentInstance, error)
InferenceList(namespace string) ([]types.InferenceDeployment, error)
InferenceScale(ctx context.Context, namespace string, req types.ScaleServiceRequest, inf *types.InferenceDeployment) error
InferenceUpdate(ctx context.Context, namespace string, req types.InferenceDeployment, event string) (err error)
// namespace
NamespaceList(ctx context.Context) ([]string, error)
NamespaceCreate(ctx context.Context, name string) error
NamespaceGet(ctx context.Context, name string) bool
NamespaceDelete(ctx context.Context, name string) error
// server
ServerDeleteNode(ctx context.Context, name string) error
ServerLabelCreate(ctx context.Context, name string, spec types.ServerSpec) error
ServerList(ctx context.Context) ([]types.Server, error)
// managed cluster
GetClusterInfo(cluster *types.ManagedCluster) error
}
func New ¶
func New(clientConfig *rest.Config, endpointsInformer corev1.EndpointsInformer, deploymentInformer appsv1.DeploymentInformer, inferenceInformer modelzv2alpha1.InferenceInformer, podInformer corev1.PodInformer, kubeClient kubernetes.Interface, ingressClient ingressclient.Interface, kubefledgedClient kubefledged.Interface, inferenceClient clientset.Interface, eventRecorder event.Interface, ingressEnabled bool, eventEnabled bool, buildEnabled bool, ingressAnyIPToDomain bool, ) (Runtime, error)
type TerminalMessage ¶
type TerminalMessage struct {
ID string `json:"id,omitempty"`
Op string `json:"op,omitempty"`
Data string `json:"data,omitempty"`
Rows uint16 `json:"rows,omitempty"`
Cols uint16 `json:"cols,omitempty"`
}
TerminalMessage is the messaging protocol between ShellController and TerminalSession.
OP DIRECTION FIELD(S) USED DESCRIPTION --------------------------------------------------------------------- bind fe->be SessionID Id sent back from TerminalResponse stdin fe->be Data Keystrokes/paste buffer resize fe->be Rows, Cols New terminal size stdout be->fe Data Output from the process toast be->fe Data OOB message to be shown to the user
type TerminalSession ¶
type TerminalSession struct {
ID string
// contains filtered or unexported fields
}
TerminalSession
func (*TerminalSession) Close ¶
func (t *TerminalSession) Close() error
func (*TerminalSession) Next ¶
func (t *TerminalSession) Next() *remotecommand.TerminalSize
TerminalSize handles pty->process resize events Called in a loop from remotecommand as long as the process is running
Source Files
¶
- build.go
- cluster_info_get.go
- image_cache.go
- inference_create.go
- inference_delete.go
- inference_exec.go
- inference_get.go
- inference_instance.go
- inference_list.go
- inference_replicas.go
- inference_update.go
- namespace.go
- node.go
- runtime.go
- server_delete.go
- server_label_create.go
- server_list.go
- util_domain.go
- util_resource.go
Click to show internal directories.
Click to hide internal directories.