Documentation
¶
Index ¶
- Constants
- func StatusDone(stage, message string) *provisionpb.Status
- func StatusError(stage, message string, err error) *provisionpb.Status
- func StatusOk(stage, message string) *provisionpb.Status
- type GRPCServer
- type Provision
- type ProvisionPlugin
- type ProvisionPluginClientGRPC
- func (c *ProvisionPluginClientGRPC) Deploy(ctx context.Context, source datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error)
- func (c *ProvisionPluginClientGRPC) TearDown(ctx context.Context, source datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error)
- func (c *ProvisionPluginClientGRPC) Validate(ctx context.Context) error
- type StatusBuilder
Constants ¶
const ProvisionPluginName = "provision"
ProvisionPluginName is the name that should be used in the plugin map.
Variables ¶
This section is empty.
Functions ¶
func StatusDone ¶ added in v0.5.0
func StatusDone(stage, message string) *provisionpb.Status
StatusOk returns a Status message with Done set to true and no Error.
func StatusError ¶ added in v0.5.0
func StatusError(stage, message string, err error) *provisionpb.Status
StatusOk returns a Status message with Done set to true and an Error.
func StatusOk ¶ added in v0.5.0
func StatusOk(stage, message string) *provisionpb.Status
StatusOk returns a Status message with Done set to false and no Error.
Types ¶
type GRPCServer ¶ added in v0.5.0
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer implements provisionpb.ProvisionPluginServiceServer, translating gRPC calls to impl, the Provision implementation.
func (*GRPCServer) Deploy ¶ added in v0.5.0
func (s *GRPCServer) Deploy(req *provisionpb.DeployRequest, stream grpc.ServerStreamingServer[provisionpb.DeployResponse]) error
func (*GRPCServer) TearDown ¶ added in v0.5.0
func (s *GRPCServer) TearDown(req *provisionpb.TearDownRequest, stream grpc.ServerStreamingServer[provisionpb.TearDownResponse]) error
func (*GRPCServer) Validate ¶ added in v0.5.0
func (s *GRPCServer) Validate(ctx context.Context, req *provisionpb.ValidateRequest) (*provisionpb.ValidateResponse, error)
type Provision ¶
type Provision interface { validator.Validator // Deploy deploys the workload identity configuration to the clusters in the system. // The method is asynchronous, returning a channel over which Status messages are sent // describing the various stages of deployment and their outcomes. Deploy(ctx context.Context, ds datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error) // TearDown tears down the workload identity configuration from the clusters in the system. // The method is asynchronous, returning a channel over which Status messages are sent // describing the various stages of tear down and their outcomes. TearDown(ctx context.Context, ds datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error) }
Provision is the interface that provision plugins have to implement.
type ProvisionPlugin ¶ added in v0.5.0
ProvisionPlugin implements the plugin.Plugin interface to provide the GRPC server or client back to the plugin machinery. The server side should provide the Impl field with a concrete implementation of the ProvisionPlugin interface.
func (*ProvisionPlugin) GRPCClient ¶ added in v0.5.0
func (pp *ProvisionPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*ProvisionPlugin) GRPCServer ¶ added in v0.5.0
func (pp *ProvisionPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error
type ProvisionPluginClientGRPC ¶ added in v0.5.0
type ProvisionPluginClientGRPC struct {
// contains filtered or unexported fields
}
ProvisionPluginClientGRPC is used by clients (main application) to translate the Provision interface of plugins to GRPC calls.
func (*ProvisionPluginClientGRPC) Deploy ¶ added in v0.5.0
func (c *ProvisionPluginClientGRPC) Deploy(ctx context.Context, source datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error)
func (*ProvisionPluginClientGRPC) TearDown ¶ added in v0.5.0
func (c *ProvisionPluginClientGRPC) TearDown(ctx context.Context, source datasource.DataSource, kubeCfgFile string) (<-chan *provisionpb.Status, error)
type StatusBuilder ¶ added in v0.5.0
type StatusBuilder struct {
// contains filtered or unexported fields
}
StatusBuilder makes it easier to construct Status messages with context about the trust zone and cluster.
func NewStatusBuilder ¶ added in v0.5.0
func NewStatusBuilder(trustZone, cluster string) *StatusBuilder
func (*StatusBuilder) Done ¶ added in v0.5.0
func (sb *StatusBuilder) Done(stage, message string) *provisionpb.Status
Done returns a Status message with Done set to true and no Error
func (*StatusBuilder) Error ¶ added in v0.5.0
func (sb *StatusBuilder) Error(stage, message string, err error) *provisionpb.Status
Error returns a Status message with Done set to true and an Error
func (*StatusBuilder) Ok ¶ added in v0.5.0
func (sb *StatusBuilder) Ok(stage, message string) *provisionpb.Status
Ok returns a Status message with Done set to false and no Error