Documentation ¶
Index ¶
- Constants
- Variables
- func NewPortFwd(ctx context.Context, obs *Session, env cfg.Context, ...) *portforward.PortForward
- func PrebuiltWebUI(ctx context.Context) (*mux.Router, error)
- func RegisterEndpoints(s *Session, r *mux.Router)
- type DevWorkflowRequest
- func (*DevWorkflowRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DevWorkflowRequest) GetReloadWorkspace() bool
- func (x *DevWorkflowRequest) GetSetWorkspace() *DevWorkflowRequest_SetWorkspace
- func (m *DevWorkflowRequest) GetType() isDevWorkflowRequest_Type
- func (*DevWorkflowRequest) ProtoMessage()
- func (x *DevWorkflowRequest) ProtoReflect() protoreflect.Message
- func (x *DevWorkflowRequest) Reset()
- func (x *DevWorkflowRequest) String() string
- type DevWorkflowRequest_ReloadWorkspace
- type DevWorkflowRequest_SetWorkspace
- func (*DevWorkflowRequest_SetWorkspace) Descriptor() ([]byte, []int)deprecated
- func (x *DevWorkflowRequest_SetWorkspace) GetAbsRoot() string
- func (x *DevWorkflowRequest_SetWorkspace) GetAdditionalServers() []string
- func (x *DevWorkflowRequest_SetWorkspace) GetEnvName() string
- func (x *DevWorkflowRequest_SetWorkspace) GetPackageName() string
- func (*DevWorkflowRequest_SetWorkspace) ProtoMessage()
- func (x *DevWorkflowRequest_SetWorkspace) ProtoReflect() protoreflect.Message
- func (x *DevWorkflowRequest_SetWorkspace) Reset()
- func (x *DevWorkflowRequest_SetWorkspace) String() string
- type DevWorkflowRequest_SetWorkspace_
- type ForwardedPort
- func (*ForwardedPort) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardedPort) GetContainerPort() int32
- func (x *ForwardedPort) GetEndpoint() *schema.Endpoint
- func (x *ForwardedPort) GetError() string
- func (x *ForwardedPort) GetLocalPort() int32
- func (*ForwardedPort) ProtoMessage()
- func (x *ForwardedPort) ProtoReflect() protoreflect.Message
- func (x *ForwardedPort) Reset()
- func (x *ForwardedPort) String() string
- type Observer
- type Observers
- type Session
- func (s *Session) BuildJSONOutput() io.ReadCloser
- func (s *Session) BuildOutput() io.ReadCloser
- func (s *Session) CommandOutput() io.ReadCloser
- func (s *Session) DeferRequest(req *DevWorkflowRequest)
- func (s *Session) NewClient(needsHistory bool) (*Observer, error)
- func (s *Session) NewStackClient() (observers.StackSession, error)
- func (s *Session) ResolveServer(ctx context.Context, serverID string) (runtime.ClusterNamespace, runtime.Deployable, error)
- func (s *Session) Run(ctx context.Context, extra func(*executor.Executor)) error
- func (s *Session) TaskLogByName(taskID, name string) io.ReadCloser
- type Stack
- func (*Stack) Descriptor() ([]byte, []int)deprecated
- func (x *Stack) GetAbsRoot() string
- func (x *Stack) GetAvailableEnv() []*schema.Environment
- func (x *Stack) GetCurrent() *schema.Stack_Entry
- func (x *Stack) GetDeployed() bool
- func (x *Stack) GetDeploymentRevision() uint64
- func (x *Stack) GetEnv() *schema.Environment
- func (x *Stack) GetFocus() []string
- func (x *Stack) GetForwardedPort() []*ForwardedPort
- func (x *Stack) GetNetworkPlan() *storage.NetworkPlan
- func (x *Stack) GetRenderedPortForwarding() string
- func (x *Stack) GetRevision() uint64
- func (x *Stack) GetStack() *schema.Stack
- func (x *Stack) GetState() []*StackEntryState
- func (x *Stack) GetWorkspace() *schema.Workspace
- func (*Stack) ProtoMessage()
- func (x *Stack) ProtoReflect() protoreflect.Message
- func (x *Stack) Reset()
- func (x *Stack) String() string
- type StackEntryState
- func (*StackEntryState) Descriptor() ([]byte, []int)deprecated
- func (x *StackEntryState) GetLastError() string
- func (x *StackEntryState) GetPackageName() string
- func (*StackEntryState) ProtoMessage()
- func (x *StackEntryState) ProtoReflect() protoreflect.Message
- func (x *StackEntryState) Reset()
- func (x *StackEntryState) String() string
- type TerminalInput
- func (*TerminalInput) Descriptor() ([]byte, []int)deprecated
- func (x *TerminalInput) GetResize() *TerminalInput_WindowResize
- func (x *TerminalInput) GetStdin() []byte
- func (*TerminalInput) ProtoMessage()
- func (x *TerminalInput) ProtoReflect() protoreflect.Message
- func (x *TerminalInput) Reset()
- func (x *TerminalInput) String() string
- type TerminalInput_WindowResize
- func (*TerminalInput_WindowResize) Descriptor() ([]byte, []int)deprecated
- func (x *TerminalInput_WindowResize) GetHeight() uint32
- func (x *TerminalInput_WindowResize) GetWidth() uint32
- func (*TerminalInput_WindowResize) ProtoMessage()
- func (x *TerminalInput_WindowResize) ProtoReflect() protoreflect.Message
- func (x *TerminalInput_WindowResize) Reset()
- func (x *TerminalInput_WindowResize) String() string
- type Update
Constants ¶
View Source
const (
WebPackage schema.PackageName = "namespacelabs.dev/foundation/internal/webui/devui"
)
Variables ¶
View Source
var File_internal_devsession_types_proto protoreflect.FileDescriptor
Functions ¶
func NewPortFwd ¶
func NewPortFwd(ctx context.Context, obs *Session, env cfg.Context, rt runtime.ClusterNamespace, localaddr string) *portforward.PortForward
func RegisterEndpoints ¶
Types ¶
type DevWorkflowRequest ¶
type DevWorkflowRequest struct { // Types that are assignable to Type: // *DevWorkflowRequest_SetWorkspace_ // *DevWorkflowRequest_ReloadWorkspace Type isDevWorkflowRequest_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
func (*DevWorkflowRequest) Descriptor
deprecated
func (*DevWorkflowRequest) Descriptor() ([]byte, []int)
Deprecated: Use DevWorkflowRequest.ProtoReflect.Descriptor instead.
func (*DevWorkflowRequest) GetReloadWorkspace ¶
func (x *DevWorkflowRequest) GetReloadWorkspace() bool
func (*DevWorkflowRequest) GetSetWorkspace ¶
func (x *DevWorkflowRequest) GetSetWorkspace() *DevWorkflowRequest_SetWorkspace
func (*DevWorkflowRequest) GetType ¶
func (m *DevWorkflowRequest) GetType() isDevWorkflowRequest_Type
func (*DevWorkflowRequest) ProtoMessage ¶
func (*DevWorkflowRequest) ProtoMessage()
func (*DevWorkflowRequest) ProtoReflect ¶
func (x *DevWorkflowRequest) ProtoReflect() protoreflect.Message
func (*DevWorkflowRequest) Reset ¶
func (x *DevWorkflowRequest) Reset()
func (*DevWorkflowRequest) String ¶
func (x *DevWorkflowRequest) String() string
type DevWorkflowRequest_ReloadWorkspace ¶
type DevWorkflowRequest_ReloadWorkspace struct {
ReloadWorkspace bool `protobuf:"varint,2,opt,name=reload_workspace,json=reloadWorkspace,proto3,oneof"`
}
type DevWorkflowRequest_SetWorkspace ¶
type DevWorkflowRequest_SetWorkspace struct { AbsRoot string `protobuf:"bytes,1,opt,name=abs_root,json=absRoot,proto3" json:"abs_root,omitempty"` PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` EnvName string `protobuf:"bytes,3,opt,name=env_name,json=envName,proto3" json:"env_name,omitempty"` // XXX this needs more appropriate modeling. AdditionalServers []string `protobuf:"bytes,4,rep,name=additional_servers,json=additionalServers,proto3" json:"additional_servers,omitempty"` // contains filtered or unexported fields }
func (*DevWorkflowRequest_SetWorkspace) Descriptor
deprecated
func (*DevWorkflowRequest_SetWorkspace) Descriptor() ([]byte, []int)
Deprecated: Use DevWorkflowRequest_SetWorkspace.ProtoReflect.Descriptor instead.
func (*DevWorkflowRequest_SetWorkspace) GetAbsRoot ¶
func (x *DevWorkflowRequest_SetWorkspace) GetAbsRoot() string
func (*DevWorkflowRequest_SetWorkspace) GetAdditionalServers ¶
func (x *DevWorkflowRequest_SetWorkspace) GetAdditionalServers() []string
func (*DevWorkflowRequest_SetWorkspace) GetEnvName ¶
func (x *DevWorkflowRequest_SetWorkspace) GetEnvName() string
func (*DevWorkflowRequest_SetWorkspace) GetPackageName ¶
func (x *DevWorkflowRequest_SetWorkspace) GetPackageName() string
func (*DevWorkflowRequest_SetWorkspace) ProtoMessage ¶
func (*DevWorkflowRequest_SetWorkspace) ProtoMessage()
func (*DevWorkflowRequest_SetWorkspace) ProtoReflect ¶
func (x *DevWorkflowRequest_SetWorkspace) ProtoReflect() protoreflect.Message
func (*DevWorkflowRequest_SetWorkspace) Reset ¶
func (x *DevWorkflowRequest_SetWorkspace) Reset()
func (*DevWorkflowRequest_SetWorkspace) String ¶
func (x *DevWorkflowRequest_SetWorkspace) String() string
type DevWorkflowRequest_SetWorkspace_ ¶
type DevWorkflowRequest_SetWorkspace_ struct {
SetWorkspace *DevWorkflowRequest_SetWorkspace `protobuf:"bytes,1,opt,name=set_workspace,json=setWorkspace,proto3,oneof"`
}
type ForwardedPort ¶
type ForwardedPort struct { Endpoint *schema.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` LocalPort int32 `protobuf:"varint,2,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"` ContainerPort int32 `protobuf:"varint,3,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ForwardedPort) Descriptor
deprecated
func (*ForwardedPort) Descriptor() ([]byte, []int)
Deprecated: Use ForwardedPort.ProtoReflect.Descriptor instead.
func (*ForwardedPort) GetContainerPort ¶
func (x *ForwardedPort) GetContainerPort() int32
func (*ForwardedPort) GetEndpoint ¶
func (x *ForwardedPort) GetEndpoint() *schema.Endpoint
func (*ForwardedPort) GetError ¶
func (x *ForwardedPort) GetError() string
func (*ForwardedPort) GetLocalPort ¶
func (x *ForwardedPort) GetLocalPort() int32
func (*ForwardedPort) ProtoMessage ¶
func (*ForwardedPort) ProtoMessage()
func (*ForwardedPort) ProtoReflect ¶
func (x *ForwardedPort) ProtoReflect() protoreflect.Message
func (*ForwardedPort) Reset ¶
func (x *ForwardedPort) Reset()
func (*ForwardedPort) String ¶
func (x *ForwardedPort) String() string
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
func (*Observer) StackEvents ¶
func (o *Observer) StackEvents() chan *observers.StackUpdateEvent
type Observers ¶
type Observers struct {
// contains filtered or unexported fields
}
func NewObservers ¶
func NewObservers() *Observers
type Session ¶
func NewSession ¶
func NewSession(errorLog io.Writer, sink *tasks.StatefulSink, localHostname string, envs []*schema.Environment) (*Session, error)
func (*Session) BuildJSONOutput ¶
func (s *Session) BuildJSONOutput() io.ReadCloser
func (*Session) BuildOutput ¶
func (s *Session) BuildOutput() io.ReadCloser
func (*Session) CommandOutput ¶
func (s *Session) CommandOutput() io.ReadCloser
XXX these need to be re-implemented.
func (*Session) DeferRequest ¶
func (s *Session) DeferRequest(req *DevWorkflowRequest)
func (*Session) NewStackClient ¶
func (s *Session) NewStackClient() (observers.StackSession, error)
Implements observers.SessionProvider.
func (*Session) ResolveServer ¶
func (s *Session) ResolveServer(ctx context.Context, serverID string) (runtime.ClusterNamespace, runtime.Deployable, error)
func (*Session) TaskLogByName ¶
func (s *Session) TaskLogByName(taskID, name string) io.ReadCloser
type Stack ¶
type Stack struct { Revision uint64 `protobuf:"varint,9,opt,name=revision,proto3" json:"revision,omitempty"` AbsRoot string `protobuf:"bytes,1,opt,name=abs_root,json=absRoot,proto3" json:"abs_root,omitempty"` Workspace *schema.Workspace `protobuf:"bytes,2,opt,name=workspace,proto3" json:"workspace,omitempty"` Env *schema.Environment `protobuf:"bytes,3,opt,name=env,proto3" json:"env,omitempty"` AvailableEnv []*schema.Environment `protobuf:"bytes,8,rep,name=available_env,json=availableEnv,proto3" json:"available_env,omitempty"` Stack *schema.Stack `protobuf:"bytes,4,opt,name=stack,proto3" json:"stack,omitempty"` Current *schema.Stack_Entry `protobuf:"bytes,5,opt,name=current,proto3" json:"current,omitempty"` Focus []string `protobuf:"bytes,11,rep,name=focus,proto3" json:"focus,omitempty"` State []*StackEntryState `protobuf:"bytes,6,rep,name=state,proto3" json:"state,omitempty"` ForwardedPort []*ForwardedPort `protobuf:"bytes,7,rep,name=forwarded_port,json=forwardedPort,proto3" json:"forwarded_port,omitempty"` // Pre-rendered "network_plan" as text. Contains ANSI color codes. // TODO: remove and use native Web rendering. RenderedPortForwarding string `` /* 130-byte string literal not displayed */ NetworkPlan *storage.NetworkPlan `protobuf:"bytes,12,opt,name=network_plan,json=networkPlan,proto3" json:"network_plan,omitempty"` Deployed bool `protobuf:"varint,13,opt,name=deployed,proto3" json:"deployed,omitempty"` DeploymentRevision uint64 `protobuf:"varint,14,opt,name=deployment_revision,json=deploymentRevision,proto3" json:"deployment_revision,omitempty"` // Every time that we see a deployment event, we increment the deployment_revision. // contains filtered or unexported fields }
Next ID: 13
func (*Stack) Descriptor
deprecated
func (*Stack) GetAbsRoot ¶
func (*Stack) GetAvailableEnv ¶
func (x *Stack) GetAvailableEnv() []*schema.Environment
func (*Stack) GetCurrent ¶
func (x *Stack) GetCurrent() *schema.Stack_Entry
func (*Stack) GetDeployed ¶ added in v0.0.81
func (*Stack) GetDeploymentRevision ¶ added in v0.0.82
func (*Stack) GetEnv ¶
func (x *Stack) GetEnv() *schema.Environment
func (*Stack) GetForwardedPort ¶
func (x *Stack) GetForwardedPort() []*ForwardedPort
func (*Stack) GetNetworkPlan ¶
func (x *Stack) GetNetworkPlan() *storage.NetworkPlan
func (*Stack) GetRenderedPortForwarding ¶
func (*Stack) GetRevision ¶
func (*Stack) GetState ¶
func (x *Stack) GetState() []*StackEntryState
func (*Stack) GetWorkspace ¶
func (*Stack) ProtoMessage ¶
func (*Stack) ProtoMessage()
func (*Stack) ProtoReflect ¶
func (x *Stack) ProtoReflect() protoreflect.Message
type StackEntryState ¶
type StackEntryState struct { PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` LastError string `protobuf:"bytes,2,opt,name=last_error,json=lastError,proto3" json:"last_error,omitempty"` // contains filtered or unexported fields }
func (*StackEntryState) Descriptor
deprecated
func (*StackEntryState) Descriptor() ([]byte, []int)
Deprecated: Use StackEntryState.ProtoReflect.Descriptor instead.
func (*StackEntryState) GetLastError ¶
func (x *StackEntryState) GetLastError() string
func (*StackEntryState) GetPackageName ¶
func (x *StackEntryState) GetPackageName() string
func (*StackEntryState) ProtoMessage ¶
func (*StackEntryState) ProtoMessage()
func (*StackEntryState) ProtoReflect ¶
func (x *StackEntryState) ProtoReflect() protoreflect.Message
func (*StackEntryState) Reset ¶
func (x *StackEntryState) Reset()
func (*StackEntryState) String ¶
func (x *StackEntryState) String() string
type TerminalInput ¶
type TerminalInput struct { Stdin []byte `protobuf:"bytes,1,opt,name=stdin,proto3" json:"stdin,omitempty"` Resize *TerminalInput_WindowResize `protobuf:"bytes,2,opt,name=resize,proto3" json:"resize,omitempty"` // contains filtered or unexported fields }
func (*TerminalInput) Descriptor
deprecated
func (*TerminalInput) Descriptor() ([]byte, []int)
Deprecated: Use TerminalInput.ProtoReflect.Descriptor instead.
func (*TerminalInput) GetResize ¶
func (x *TerminalInput) GetResize() *TerminalInput_WindowResize
func (*TerminalInput) GetStdin ¶
func (x *TerminalInput) GetStdin() []byte
func (*TerminalInput) ProtoMessage ¶
func (*TerminalInput) ProtoMessage()
func (*TerminalInput) ProtoReflect ¶
func (x *TerminalInput) ProtoReflect() protoreflect.Message
func (*TerminalInput) Reset ¶
func (x *TerminalInput) Reset()
func (*TerminalInput) String ¶
func (x *TerminalInput) String() string
type TerminalInput_WindowResize ¶
type TerminalInput_WindowResize struct { Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // contains filtered or unexported fields }
func (*TerminalInput_WindowResize) Descriptor
deprecated
func (*TerminalInput_WindowResize) Descriptor() ([]byte, []int)
Deprecated: Use TerminalInput_WindowResize.ProtoReflect.Descriptor instead.
func (*TerminalInput_WindowResize) GetHeight ¶
func (x *TerminalInput_WindowResize) GetHeight() uint32
func (*TerminalInput_WindowResize) GetWidth ¶
func (x *TerminalInput_WindowResize) GetWidth() uint32
func (*TerminalInput_WindowResize) ProtoMessage ¶
func (*TerminalInput_WindowResize) ProtoMessage()
func (*TerminalInput_WindowResize) ProtoReflect ¶
func (x *TerminalInput_WindowResize) ProtoReflect() protoreflect.Message
func (*TerminalInput_WindowResize) Reset ¶
func (x *TerminalInput_WindowResize) Reset()
func (*TerminalInput_WindowResize) String ¶
func (x *TerminalInput_WindowResize) String() string
type Update ¶
type Update struct { StackUpdate *Stack `protobuf:"bytes,1,opt,name=stack_update,json=stackUpdate,proto3" json:"stack_update,omitempty"` TaskUpdate []*protocol.Task `protobuf:"bytes,2,rep,name=task_update,json=taskUpdate,proto3" json:"task_update,omitempty"` // contains filtered or unexported fields }
func (*Update) Descriptor
deprecated
func (*Update) GetStackUpdate ¶
func (*Update) GetTaskUpdate ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶
func (x *Update) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.