Documentation
¶
Overview ¶
Package devcontrol defines the native-independent development control client and typed adapter contract. The listener and dispatcher require devcontrol.
Index ¶
- Variables
- type Adapters
- type Client
- type Config
- type DependenciesParams
- type Dev
- type DevState
- type EmptyParams
- type ExtensionParams
- type Extensions
- type LogEntry
- type LogPage
- type LogsParams
- type OperationParams
- type PathParams
- type PluginParams
- type Plugins
- type RebuildParams
- type Server
- type Settings
- type SettingsParams
- type VersionParams
Constants ¶
This section is empty.
Variables ¶
var ErrDisabled = errors.New("development control is not compiled into this binary")
Functions ¶
This section is empty.
Types ¶
type Adapters ¶
type Adapters struct {
Inspect func(context.Context) (devcontract.InstanceDescriptor, error)
Plugins Plugins
Dev Dev
Settings Settings
Extensions Extensions
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
Descriptor devcontract.InstanceDescriptor
Discovery *devsession.DiscoveryStore
Adapters Adapters
}
type DependenciesParams ¶
type Dev ¶
type Dev interface {
Start(context.Context, string) (DevState, error)
Stop(context.Context, string) error
Restart(context.Context, string) (DevState, error)
Rebuild(context.Context, string, string) (DevState, error)
SetDependencyWatching(context.Context, string, string, bool) error
Status(string) (DevState, error)
Logs(string, int, int, bool) (LogPage, error)
WaitReady(context.Context, string, string) (DevState, error)
}
Dev owns actual lifecycle transitions; a successful Start/Rebuild waits for the generation's capability-aware readiness, not merely a spawned process.
type DevState ¶
type DevState struct {
devcontract.PluginState
Ready bool `json:"ready"`
ViteURL string `json:"viteURL,omitempty"`
HMRURL string `json:"hmrURL,omitempty"`
}
type EmptyParams ¶
type EmptyParams struct{}
type ExtensionParams ¶ added in v0.24.0
type ExtensionParams struct {
WindowName string `json:"windowName,omitempty"`
TimeoutMS int `json:"timeoutMS,omitempty"`
extensiondiagnostics.Options
}
type Extensions ¶ added in v0.24.0
type Extensions interface {
Query(context.Context, string, string, extensiondiagnostics.Options) (json.RawMessage, error)
Windows(context.Context) ([]extensiondiagnostics.RuntimeInfo, error)
}
type LogsParams ¶
type OperationParams ¶
type PathParams ¶
type PathParams struct {
Path string `json:"path"`
}
type PluginParams ¶
type PluginParams struct {
ID string `json:"id"`
}
type Plugins ¶
type Plugins interface {
ListPlugins() []sdktypes.PluginInfo
GetPlugin(string) (sdktypes.PluginInfo, error)
InstallPluginFromPath(string) (*config.PluginMeta, error)
InstallPluginVersion(string, string) (*config.PluginMeta, error)
UninstallPlugin(string) (sdktypes.PluginInfo, error)
InstallDevPluginFromPath(string) (sdktypes.PluginInfo, error)
UnlinkDevPlugin(string) (sdktypes.PluginInfo, error)
}
Plugins is the canonical noninteractive manager subset. No dialog APIs.
type RebuildParams ¶
type Server ¶
type Server struct{}
Server is inert in ordinary/release builds. No listener, dispatcher, auth implementation or host adapter is linked without the explicit devcontrol tag.
func (*Server) Refresh ¶
func (*Server) Refresh(context.Context, devcontract.InstanceDescriptor) error
type Settings ¶
type Settings interface {
Schema(SettingsParams) (map[string]pkgsettings.Setting, error)
Get(SettingsParams) (any, error)
Set(SettingsParams) (settingsservice.CommitResult, error)
Bulk(SettingsParams) (settingsservice.CommitResult, error)
}
type SettingsParams ¶
type SettingsParams struct {
Scope string `json:"scope"`
PluginID string `json:"pluginID,omitempty"`
ID string `json:"id,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
Values map[string]json.RawMessage `json:"values,omitempty"`
}