package
0.0.0-20241219150934-9249a2757f07
Repository: https://github.com/smart-core-os/sc-golang.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewModel constructs a Model with default values:
Current: 0 Voltage: 240 Rating: 13
No modes, active mode is empty.
No description provided by the author
No description provided by the author
WithActiveModeOption configures the activeMode resource of the model.
WithClock returns an option that configures the model to use the given clock for all resources.
WithDemandOption configures the demand resource of the model.
WithElectricApiClientFactory instructs the router to create a new client the first time Get is called for that name.
WithElectricInfoClientFactory instructs the router to create a new client the first time Get is called for that name.
WithInitialActiveMode returns an option that configures the model to initialise with the given active mode.
WithInitialDemand returns an option that configures the model to initialise with the given demand.
WithInitialMode returns an option that configures the model to initialise with the given modes.
WithMemorySettingsApiClientFactory instructs the router to create a new client the first time Get is called for that name.
WithModeOption configures the mode resource of the model.
WithRNG returns an option that configures the model to use the given random number generator.
WrapApi adapts a traits.ElectricApiServer and presents it as a traits.ElectricApiClient.
WrapInfo adapts a traits.ElectricInfoServer and presents it as a traits.ElectricInfoClient.
WrapMemorySettingsApi adapts a MemorySettingsApiServer and presents it as a MemorySettingsApiClient.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DefaultModelOptions holds the default options for the model.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MemorySettingsApi_ServiceDesc is the grpc.ServiceDesc for MemorySettingsApi service.
# Structs
ApiRouter is a traits.ElectricApiServer that allows routing named requests to specific traits.ElectricApiClient.
No description provided by the author
No description provided by the author
No description provided by the author
InfoRouter is a traits.ElectricInfoServer that allows routing named requests to specific traits.ElectricInfoClient.
No description provided by the author
MemorySettingsApiRouter is a MemorySettingsApiServer that allows routing named requests to specific MemorySettingsApiClient.
No description provided by the author
Model is a simple data store for electric devices.
ModelServer is an implementation of ElectricApiServer and MemorySettingsApiServer backed by a Model.
No description provided by the author
No description provided by the author
No description provided by the author
UnimplementedMemorySettingsApiServer must be embedded to have forward compatible implementations.
No description provided by the author
No description provided by the author
# Interfaces
MemorySettingsApiClient is the client API for MemorySettingsApi service.
MemorySettingsApiServer is the server API for MemorySettingsApi service.
ModelOption defined the base type for all options that apply to this traits model.
UnsafeMemorySettingsApiServer may be embedded to opt out of forward compatibility for this service.