jupyt

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCPU    = 2
	DefaultMemory = 8 * 1024 * 1024 * 1024
)
View Source
const (
	JupytPort = 27042
)

Variables

View Source
var GetEndpointCmdDescriptor = api.CmdDescriptor{
	Name:        "get_endpoint",
	Parameters:  []api.CmdParameter{api.AliasParameter.AsExplicit()},
	Description: "get endpoint of JupYT strawberry operation",
	Handler:     HandleGetEndpoint,
}

Functions

func HandleGetEndpoint added in v0.0.9

func HandleGetEndpoint(a api.HTTPAPI, w http.ResponseWriter, r *http.Request, params map[string]any)

func NewClusterInitializer added in v0.0.11

func NewClusterInitializer(l log.Logger, ytc yt.Client, root ypath.Path) strawberry.ClusterInitializer

func NewController

func NewController(l log.Logger, ytc yt.Client, root ypath.Path, cluster string, rawConfig yson.RawValue) strawberry.Controller

Types

type ClusterInitializer added in v0.0.11

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

func (*ClusterInitializer) ACONamespace added in v0.0.11

func (initializer *ClusterInitializer) ACONamespace() string

func (*ClusterInitializer) InitializeCluster added in v0.0.11

func (initializer *ClusterInitializer) InitializeCluster() error

type Config

type Config struct {
}

type Controller

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

func (*Controller) DescribeOptions

func (c *Controller) DescribeOptions(parsedSpeclet any) []strawberry.OptionGroupDescriptor

func (*Controller) Family

func (c *Controller) Family() string

func (*Controller) GetOpBriefAttributes

func (c *Controller) GetOpBriefAttributes(parsedSpeclet any) map[string]any

func (*Controller) ParseSpeclet

func (c *Controller) ParseSpeclet(specletYson yson.RawValue) (any, error)

func (*Controller) Prepare

func (c *Controller) Prepare(ctx context.Context, oplet *strawberry.Oplet) (
	spec map[string]any, description map[string]any, annotations map[string]any, err error)

func (*Controller) Root

func (c *Controller) Root() ypath.Path

func (*Controller) UpdateState

func (c *Controller) UpdateState() (changed bool, err error)

type GetEndpointResult added in v0.0.9

type GetEndpointResult struct {
	Address     string         `yson:"address"`
	OperationID yt.OperationID `yson:"operation_id"`
	JobID       yt.JobID       `yson:"job_id"`
}

func GetEndpoint added in v0.0.9

func GetEndpoint(a *api.API, ctx context.Context, alias string) (result GetEndpointResult, err error)

type Speclet

type Speclet struct {
	CPU    *uint64 `yson:"cpu"`
	Memory *uint64 `yson:"memory"`

	JupyterDockerImage string `yson:"jupyter_docker_image"`
}

func (*Speclet) CPUOrDefault

func (speclet *Speclet) CPUOrDefault() uint64

func (*Speclet) MemoryOrDefault

func (speclet *Speclet) MemoryOrDefault() uint64

Jump to

Keyboard shortcuts

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