Documentation ¶
Index ¶
- func BuildProvider(providerRepoPath string, entProvider *ent.Provider) error
- func ExecuteProvider(ctx context.Context, cacheDir string, entProvider *ent.Provider, ...)
- type CBLEServer
- func (ps *CBLEServer) Configure(ctx context.Context, entProvider *ent.Provider) (*pgrpc.ConfigureReply, error)
- func (ps *CBLEServer) DeployResource(ctx context.Context, entProvider *ent.Provider, ...) (*pgrpc.DeployResourceReply, error)
- func (ps *CBLEServer) DestroyResource(ctx context.Context, entProvider *ent.Provider, ...) (*pgrpc.DestroyResourceReply, error)
- func (ps *CBLEServer) ExtractResourceMetadata(ctx context.Context, entProvider *ent.Provider, entResources []*ent.Resource) (*pgrpc.ExtractResourceMetadataReply, error)
- func (ps *CBLEServer) GetConsole(ctx context.Context, entProvider *ent.Provider, ...) (*pgrpc.GetConsoleReply, error)
- func (ps *CBLEServer) Listen(ctx context.Context, wg *sync.WaitGroup)
- func (ps *CBLEServer) QueueLoadProvider(id string)
- func (ps *CBLEServer) QueueUnloadProvider(id string) error
- func (ps *CBLEServer) RegisterProvider(ctx context.Context, request *cbleGRPC.RegistrationRequest) (*cbleGRPC.RegistrationReply, error)
- func (ps *CBLEServer) ResourcePower(ctx context.Context, entProvider *ent.Provider, ...) (*pgrpc.ResourcePowerReply, error)
- func (ps *CBLEServer) RetrieveData(ctx context.Context, entProvider *ent.Provider, ...) (*pgrpc.RetrieveDataReply, error)
- func (ps *CBLEServer) RunAllProviders(ctx context.Context) error
- func (ps *CBLEServer) RunProviderClients(ctx context.Context, wg *sync.WaitGroup)
- func (ps *CBLEServer) RunProviderServers(ctx context.Context, wg *sync.WaitGroup)
- func (ps *CBLEServer) UnregisterProvider(ctx context.Context, request *cbleGRPC.UnregistrationRequest) (*cbleGRPC.UnregistrationReply, error)
- type DockerErrorDetail
- type DockerErrorLine
- type DockerMetadata
- type ProviderMetadata
- type ProviderType
- type RegisteredProvider
- type ShellMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CBLEServer ¶
type CBLEServer struct { cbleGRPC.DefaultCBLEServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(entClient *ent.Client, providersConfig *config.ProvidersConfig) *CBLEServer
func (*CBLEServer) Configure ¶
func (ps *CBLEServer) Configure(ctx context.Context, entProvider *ent.Provider) (*pgrpc.ConfigureReply, error)
Runs a synchronous GenerateDependencies command
func (*CBLEServer) DeployResource ¶
func (ps *CBLEServer) DeployResource(ctx context.Context, entProvider *ent.Provider, entDeploymentNode *ent.DeploymentNode, templatedObject []byte) (*pgrpc.DeployResourceReply, error)
Runs a synchronous DeployResource command
func (*CBLEServer) DestroyResource ¶
func (ps *CBLEServer) DestroyResource(ctx context.Context, entProvider *ent.Provider, entDeploymentNode *ent.DeploymentNode) (*pgrpc.DestroyResourceReply, error)
Runs a synchronous DestroyResource command
func (*CBLEServer) ExtractResourceMetadata ¶
func (ps *CBLEServer) ExtractResourceMetadata(ctx context.Context, entProvider *ent.Provider, entResources []*ent.Resource) (*pgrpc.ExtractResourceMetadataReply, error)
Runs a synchronous ExtractResourceMetadata command
func (*CBLEServer) GetConsole ¶
func (ps *CBLEServer) GetConsole(ctx context.Context, entProvider *ent.Provider, entDeploymentNode *ent.DeploymentNode) (*pgrpc.GetConsoleReply, error)
Runs a synchronous GetConsole command
func (*CBLEServer) Listen ¶
func (ps *CBLEServer) Listen(ctx context.Context, wg *sync.WaitGroup)
Listens on configured port. Runs in a go routine
func (*CBLEServer) QueueLoadProvider ¶
func (ps *CBLEServer) QueueLoadProvider(id string)
func (*CBLEServer) QueueUnloadProvider ¶
func (ps *CBLEServer) QueueUnloadProvider(id string) error
func (*CBLEServer) RegisterProvider ¶
func (ps *CBLEServer) RegisterProvider(ctx context.Context, request *cbleGRPC.RegistrationRequest) (*cbleGRPC.RegistrationReply, error)
func (*CBLEServer) ResourcePower ¶
func (ps *CBLEServer) ResourcePower(ctx context.Context, entProvider *ent.Provider, entDeploymentNode *ent.DeploymentNode, state pgrpc.PowerState) (*pgrpc.ResourcePowerReply, error)
Runs a synchronous ResourcePower command
func (*CBLEServer) RetrieveData ¶
func (ps *CBLEServer) RetrieveData(ctx context.Context, entProvider *ent.Provider, entDeploymentNode *ent.DeploymentNode, templatedObject []byte) (*pgrpc.RetrieveDataReply, error)
Runs a synchronous RetrieveData command
func (*CBLEServer) RunAllProviders ¶
func (ps *CBLEServer) RunAllProviders(ctx context.Context) error
func (*CBLEServer) RunProviderClients ¶
func (ps *CBLEServer) RunProviderClients(ctx context.Context, wg *sync.WaitGroup)
Runs all provider clients queued to connect. Runs in a go routine
func (*CBLEServer) RunProviderServers ¶
func (ps *CBLEServer) RunProviderServers(ctx context.Context, wg *sync.WaitGroup)
Runs all provider servers queued to start. Runs in a go routine
func (*CBLEServer) UnregisterProvider ¶
func (ps *CBLEServer) UnregisterProvider(ctx context.Context, request *cbleGRPC.UnregistrationRequest) (*cbleGRPC.UnregistrationReply, error)
type DockerErrorDetail ¶
type DockerErrorDetail struct {
Message string `json:"message"`
}
type DockerErrorLine ¶
type DockerErrorLine struct { Error string `json:"error"` ErrorDetail DockerErrorDetail `json:"errorDetail"` }
type DockerMetadata ¶
type ProviderMetadata ¶
type ProviderMetadata struct { Name string `yaml:"name"` Description string `yaml:"description"` Author string `yaml:"author"` Version string `yaml:"version"` Type ProviderType `yaml:"type"` DockerMeta *DockerMetadata `yaml:"docker,omitempty"` ShellMeta *ShellMetadata `yaml:"shell,omitempty"` }
func ParseMetadata ¶
func ParseMetadata(providerRepoPath string) (*ProviderMetadata, error)
type ProviderType ¶
type ProviderType string
const ( TypeDocker ProviderType = "docker" TypeShell ProviderType = "shell" )
type RegisteredProvider ¶
type RegisteredProvider struct { ID string SocketID string Features *cbleGRPC.ProviderFeatures }
type ShellMetadata ¶
Click to show internal directories.
Click to hide internal directories.