Help us shape the future of Go! Take the 2026 Go Developer Survey

bldr_project_watcher

package
v0.57.21 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigID = "bldr/project/watcher"

ConfigID is the identifier for the config type.

View Source
const ControllerID = ConfigID

ControllerID is the ID of the controller.

Variables

View Source
var Version = controller.MustParseVersion("0.0.1")

Version is the version of the controller implementation.

Functions

func NewFactory

func NewFactory(b bus.Bus) controller.Factory

NewFactory constructs a new controller factory.

func ResolveStarlarkPath

func ResolveStarlarkPath(configPath string) string

ResolveStarlarkPath returns the bldr.star path beside a config path. e.g. "bldr.yaml" -> "bldr.star", "path/to/bldr.yaml" -> "path/to/bldr.star"

Types

type Config

type Config struct {

	// ConfigPath is the path to load the bldr.yaml configuration.
	// If the path is empty, starts the project controller with a blank config.
	ConfigPath string `protobuf:"bytes,1,opt,name=config_path,json=configPath,proto3" json:"configPath,omitempty"`
	// ProjectControllerConfig configures the project controller.
	// The loaded project controller config will be merged into this config.
	ProjectControllerConfig *controller.Config `` /* 130-byte string literal not displayed */
	// DisableWatch disables watching the file (loads once only).
	DisableWatch bool `protobuf:"varint,3,opt,name=disable_watch,json=disableWatch,proto3" json:"disableWatch,omitempty"`
	// BoundRemotes are caller-supplied World capabilities. These bindings take
	// precedence over source configuration, including watched configuration edits.
	BoundRemotes map[string]*project.RemoteConfig `` /* 184-byte string literal not displayed */
	// contains filtered or unexported fields
}

Config configures the project file watcher.

func NewConfig

func NewConfig(
	configPath string,
	projCtrlConfig *bldr_project_controller.Config,
) *Config

NewConfig constructs the configuration.

func (*Config) CloneMessageVT

func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Config) CloneVT

func (m *Config) CloneVT() *Config

func (*Config) EqualMessageVT

func (this *Config) EqualMessageVT(thatMsg any) bool

func (*Config) EqualVT

func (this *Config) EqualVT(that *Config) bool

func (*Config) EqualsConfig

func (c *Config) EqualsConfig(c2 config.Config) bool

EqualsConfig checks equality between two configs.

func (*Config) GetBoundRemotes

func (x *Config) GetBoundRemotes() map[string]*project.RemoteConfig

func (*Config) GetConfigID

func (c *Config) GetConfigID() string

GetConfigID returns the config identifier.

func (*Config) GetConfigPath

func (x *Config) GetConfigPath() string

func (*Config) GetDisableWatch

func (x *Config) GetDisableWatch() bool

func (*Config) GetProjectControllerConfig

func (x *Config) GetProjectControllerConfig() *controller.Config

func (*Config) MarshalJSON

func (x *Config) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Config to JSON.

func (*Config) MarshalProtoJSON

func (x *Config) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Config message to JSON.

func (*Config) MarshalProtoText

func (x *Config) MarshalProtoText() string

func (*Config) MarshalToSizedBufferVT

func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Config) MarshalToVT

func (m *Config) MarshalToVT(dAtA []byte) (int, error)

func (*Config) MarshalVT

func (m *Config) MarshalVT() (dAtA []byte, err error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT

func (m *Config) SizeVT() (n int)

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalJSON

func (x *Config) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Config from JSON.

func (*Config) UnmarshalProtoJSON

func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Config message from JSON.

func (*Config) UnmarshalVT

func (m *Config) UnmarshalVT(dAtA []byte) error

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type Config_BoundRemotesEntry

type Config_BoundRemotesEntry struct {
	Key   string                `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *project.RemoteConfig `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Config_BoundRemotesEntry) GetKey

func (x *Config_BoundRemotesEntry) GetKey() string

func (*Config_BoundRemotesEntry) GetValue

func (*Config_BoundRemotesEntry) MarshalJSON

func (x *Config_BoundRemotesEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Config_BoundRemotesEntry to JSON.

func (*Config_BoundRemotesEntry) MarshalProtoJSON

func (x *Config_BoundRemotesEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Config_BoundRemotesEntry message to JSON.

func (*Config_BoundRemotesEntry) MarshalProtoText

func (x *Config_BoundRemotesEntry) MarshalProtoText() string

func (*Config_BoundRemotesEntry) ProtoMessage

func (*Config_BoundRemotesEntry) ProtoMessage()

func (*Config_BoundRemotesEntry) Reset

func (x *Config_BoundRemotesEntry) Reset()

func (*Config_BoundRemotesEntry) String

func (x *Config_BoundRemotesEntry) String() string

func (*Config_BoundRemotesEntry) UnmarshalJSON

func (x *Config_BoundRemotesEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Config_BoundRemotesEntry from JSON.

func (*Config_BoundRemotesEntry) UnmarshalProtoJSON

func (x *Config_BoundRemotesEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Config_BoundRemotesEntry message from JSON.

type Controller

type Controller struct {
	*bus.BusController[*Config]
	// contains filtered or unexported fields
}

Controller is the bldr Project Watcher controller.

func (*Controller) Execute

func (c *Controller) Execute(rctx context.Context) error

Execute executes the controller goroutine. Returning nil ends execution. Returning an error triggers a retry with backoff.

func (*Controller) GetProjectController

GetProjectController returns the project controller watchable.

type Factory

type Factory = bus.BusFactory[*Config, *Controller]

Factory is the factory for the controller.

Jump to

Keyboard shortcuts

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