Documentation ¶
Index ¶
- Variables
- type ResourcePlugin
- type ResourcePluginClient
- func (r *ResourcePluginClient) Create(ctx *pkgtypes.PluginContext, key string, input types.CreateInput) (*types.CreateResult, error)
- func (r *ResourcePluginClient) Delete(ctx *pkgtypes.PluginContext, key string, input types.DeleteInput) (*types.DeleteResult, error)
- func (r *ResourcePluginClient) DeleteConnection(ctx *pkgtypes.PluginContext, id string) error
- func (r *ResourcePluginClient) Find(ctx *pkgtypes.PluginContext, key string, input types.FindInput) (*types.FindResult, error)
- func (r *ResourcePluginClient) Get(ctx *pkgtypes.PluginContext, key string, input types.GetInput) (*types.GetResult, error)
- func (r *ResourcePluginClient) GetConnection(ctx *pkgtypes.PluginContext, id string) (pkgtypes.Connection, error)
- func (r *ResourcePluginClient) GetConnectionNamespaces(ctx *pkgtypes.PluginContext, id string) ([]string, error)
- func (r *ResourcePluginClient) GetDefaultLayout() ([]types.LayoutItem, error)
- func (r *ResourcePluginClient) GetLayout(layoutID string) ([]types.LayoutItem, error)
- func (r *ResourcePluginClient) GetResourceDefinition(id string) (types.ResourceDefinition, error)
- func (r *ResourcePluginClient) GetResourceGroup(id string) (types.ResourceGroup, error)
- func (r *ResourcePluginClient) GetResourceGroups(connID string) map[string]types.ResourceGroup
- func (r *ResourcePluginClient) GetResourceType(id string) (*types.ResourceMeta, error)
- func (r *ResourcePluginClient) GetResourceTypes(connID string) map[string]types.ResourceMeta
- func (r *ResourcePluginClient) HasInformer(_ *pkgtypes.PluginContext, connectionID string) bool
- func (r *ResourcePluginClient) HasResourceType(id string) bool
- func (r *ResourcePluginClient) List(ctx *pkgtypes.PluginContext, key string, input types.ListInput) (*types.ListResult, error)
- func (r *ResourcePluginClient) ListConnections(ctx *pkgtypes.PluginContext) ([]pkgtypes.Connection, error)
- func (r *ResourcePluginClient) ListenForEvents(ctx *pkgtypes.PluginContext, addStream chan types.InformerAddPayload, ...) error
- func (r *ResourcePluginClient) LoadConnections(ctx *pkgtypes.PluginContext) ([]pkgtypes.Connection, error)
- func (r *ResourcePluginClient) SetLayout(_ string, _ []types.LayoutItem) error
- func (r *ResourcePluginClient) StartConnection(ctx *pkgtypes.PluginContext, connectionID string) (pkgtypes.ConnectionStatus, error)
- func (r *ResourcePluginClient) StartConnectionInformer(ctx *pkgtypes.PluginContext, connectionID string) error
- func (r *ResourcePluginClient) StopConnection(ctx *pkgtypes.PluginContext, connectionID string) (pkgtypes.Connection, error)
- func (r *ResourcePluginClient) StopConnectionInformer(ctx *pkgtypes.PluginContext, connectionID string) error
- func (r *ResourcePluginClient) Update(ctx *pkgtypes.PluginContext, key string, input types.UpdateInput) (*types.UpdateResult, error)
- func (r *ResourcePluginClient) UpdateConnection(ctx *pkgtypes.PluginContext, conn pkgtypes.Connection) (pkgtypes.Connection, error)
- type ResourcePluginServer
- func (s *ResourcePluginServer) Create(ctx context.Context, in *proto.CreateRequest) (*proto.CreateResponse, error)
- func (s *ResourcePluginServer) Delete(ctx context.Context, in *proto.DeleteRequest) (*proto.DeleteResponse, error)
- func (s *ResourcePluginServer) DeleteConnection(ctx context.Context, in *proto.ConnectionRequest) (*emptypb.Empty, error)
- func (s *ResourcePluginServer) Find(ctx context.Context, in *proto.FindRequest) (*proto.FindResponse, error)
- func (s *ResourcePluginServer) Get(ctx context.Context, in *proto.GetRequest) (*proto.GetResponse, error)
- func (s *ResourcePluginServer) GetConnection(ctx context.Context, in *proto.ConnectionRequest) (*proto.Connection, error)
- func (s *ResourcePluginServer) GetConnectionNamespaces(ctx context.Context, in *proto.ConnectionRequest) (*proto.ConnectionNamespacesResponse, error)
- func (s *ResourcePluginServer) GetDefaultLayout(_ context.Context, _ *emptypb.Empty) (*proto.Layout, error)
- func (s *ResourcePluginServer) GetLayout(_ context.Context, in *proto.GetLayoutRequest) (*proto.Layout, error)
- func (s *ResourcePluginServer) GetResourceDefinition(_ context.Context, in *proto.ResourceTypeRequest) (*proto.ResourceDefinition, error)
- func (s *ResourcePluginServer) GetResourceGroup(_ context.Context, in *proto.ResourceGroupRequest) (*proto.ResourceGroup, error)
- func (s *ResourcePluginServer) GetResourceGroups(_ context.Context, in *proto.ResourceGroupListRequest) (*proto.ResourceGroupListResponse, error)
- func (s *ResourcePluginServer) GetResourceType(_ context.Context, in *proto.ResourceTypeRequest) (*proto.ResourceMeta, error)
- func (s *ResourcePluginServer) GetResourceTypes(_ context.Context, in *proto.ResourceTypeListRequest) (*proto.ResourceTypes, error)
- func (s *ResourcePluginServer) HasInformer(ctx context.Context, in *proto.HasInformerRequest) (*wrapperspb.BoolValue, error)
- func (s *ResourcePluginServer) HasResourceType(_ context.Context, in *proto.ResourceTypeRequest) (*wrapperspb.BoolValue, error)
- func (s *ResourcePluginServer) List(ctx context.Context, in *proto.ListRequest) (*proto.ListResponse, error)
- func (s *ResourcePluginServer) ListConnections(ctx context.Context, _ *emptypb.Empty) (*proto.ConnectionList, error)
- func (s *ResourcePluginServer) ListenForEvents(_ *emptypb.Empty, stream proto.ResourcePlugin_ListenForEventsServer) error
- func (s *ResourcePluginServer) LoadConnections(ctx context.Context, _ *emptypb.Empty) (*proto.ConnectionList, error)
- func (s *ResourcePluginServer) SetLayout(_ context.Context, in *proto.SetLayoutRequest) (*emptypb.Empty, error)
- func (s *ResourcePluginServer) StartConnection(ctx context.Context, in *proto.ConnectionRequest) (*proto.ConnectionStatus, error)
- func (s *ResourcePluginServer) StartConnectionInformer(ctx context.Context, in *proto.StartConnectionInformerRequest) (*emptypb.Empty, error)
- func (s *ResourcePluginServer) StopConnection(ctx context.Context, in *proto.ConnectionRequest) (*proto.Connection, error)
- func (s *ResourcePluginServer) StopConnectionInformer(ctx context.Context, in *proto.StopConnectionInformerRequest) (*emptypb.Empty, error)
- func (s *ResourcePluginServer) Update(ctx context.Context, in *proto.UpdateRequest) (*proto.UpdateResponse, error)
- func (s *ResourcePluginServer) UpdateConnection(ctx context.Context, in *proto.UpdateConnectionRequest) (*proto.Connection, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoConnection = errors.New("no connection provided")
Functions ¶
This section is empty.
Types ¶
type ResourcePlugin ¶
type ResourcePlugin struct { plugin.Plugin // Concrete implementation, written in Go. This is only used for plugins // that are written in Go. Impl types.ResourceProvider }
This is the implementation of plugin.Plugin so we can serve/consume this.
func (*ResourcePlugin) GRPCClient ¶
func (p *ResourcePlugin) GRPCClient( _ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
func (*ResourcePlugin) GRPCServer ¶
func (p *ResourcePlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
type ResourcePluginClient ¶
type ResourcePluginClient struct {
// contains filtered or unexported fields
}
ResourcePluginClient is the real client implementation for ResourcePlugin.
func (*ResourcePluginClient) Create ¶
func (r *ResourcePluginClient) Create( ctx *pkgtypes.PluginContext, key string, input types.CreateInput, ) (*types.CreateResult, error)
func (*ResourcePluginClient) Delete ¶
func (r *ResourcePluginClient) Delete( ctx *pkgtypes.PluginContext, key string, input types.DeleteInput, ) (*types.DeleteResult, error)
func (*ResourcePluginClient) DeleteConnection ¶
func (r *ResourcePluginClient) DeleteConnection( ctx *pkgtypes.PluginContext, id string, ) error
func (*ResourcePluginClient) Find ¶
func (r *ResourcePluginClient) Find( ctx *pkgtypes.PluginContext, key string, input types.FindInput, ) (*types.FindResult, error)
func (*ResourcePluginClient) Get ¶
func (r *ResourcePluginClient) Get( ctx *pkgtypes.PluginContext, key string, input types.GetInput, ) (*types.GetResult, error)
func (*ResourcePluginClient) GetConnection ¶
func (r *ResourcePluginClient) GetConnection( ctx *pkgtypes.PluginContext, id string, ) (pkgtypes.Connection, error)
func (*ResourcePluginClient) GetConnectionNamespaces ¶
func (r *ResourcePluginClient) GetConnectionNamespaces( ctx *pkgtypes.PluginContext, id string, ) ([]string, error)
func (*ResourcePluginClient) GetDefaultLayout ¶
func (r *ResourcePluginClient) GetDefaultLayout() ([]types.LayoutItem, error)
func (*ResourcePluginClient) GetLayout ¶
func (r *ResourcePluginClient) GetLayout(layoutID string) ([]types.LayoutItem, error)
func (*ResourcePluginClient) GetResourceDefinition ¶
func (r *ResourcePluginClient) GetResourceDefinition(id string) (types.ResourceDefinition, error)
func (*ResourcePluginClient) GetResourceGroup ¶
func (r *ResourcePluginClient) GetResourceGroup(id string) (types.ResourceGroup, error)
func (*ResourcePluginClient) GetResourceGroups ¶
func (r *ResourcePluginClient) GetResourceGroups(connID string) map[string]types.ResourceGroup
func (*ResourcePluginClient) GetResourceType ¶
func (r *ResourcePluginClient) GetResourceType(id string) (*types.ResourceMeta, error)
func (*ResourcePluginClient) GetResourceTypes ¶
func (r *ResourcePluginClient) GetResourceTypes(connID string) map[string]types.ResourceMeta
func (*ResourcePluginClient) HasInformer ¶
func (r *ResourcePluginClient) HasInformer( _ *pkgtypes.PluginContext, connectionID string, ) bool
func (*ResourcePluginClient) HasResourceType ¶
func (r *ResourcePluginClient) HasResourceType(id string) bool
func (*ResourcePluginClient) List ¶
func (r *ResourcePluginClient) List( ctx *pkgtypes.PluginContext, key string, input types.ListInput, ) (*types.ListResult, error)
func (*ResourcePluginClient) ListConnections ¶
func (r *ResourcePluginClient) ListConnections( ctx *pkgtypes.PluginContext, ) ([]pkgtypes.Connection, error)
func (*ResourcePluginClient) ListenForEvents ¶
func (r *ResourcePluginClient) ListenForEvents( ctx *pkgtypes.PluginContext, addStream chan types.InformerAddPayload, updateStream chan types.InformerUpdatePayload, deleteStream chan types.InformerDeletePayload, ) error
ListenForEvents listens for events from the resource provider and pipes them back to the event subsystem, stopping when stopCh is closed. This method is blocking, and should be run as part of the resourcer controller's event loop.
func (*ResourcePluginClient) LoadConnections ¶
func (r *ResourcePluginClient) LoadConnections( ctx *pkgtypes.PluginContext, ) ([]pkgtypes.Connection, error)
func (*ResourcePluginClient) SetLayout ¶
func (r *ResourcePluginClient) SetLayout(_ string, _ []types.LayoutItem) error
func (*ResourcePluginClient) StartConnection ¶
func (r *ResourcePluginClient) StartConnection( ctx *pkgtypes.PluginContext, connectionID string, ) (pkgtypes.ConnectionStatus, error)
func (*ResourcePluginClient) StartConnectionInformer ¶
func (r *ResourcePluginClient) StartConnectionInformer( ctx *pkgtypes.PluginContext, connectionID string, ) error
func (*ResourcePluginClient) StopConnection ¶
func (r *ResourcePluginClient) StopConnection( ctx *pkgtypes.PluginContext, connectionID string, ) (pkgtypes.Connection, error)
func (*ResourcePluginClient) StopConnectionInformer ¶
func (r *ResourcePluginClient) StopConnectionInformer( ctx *pkgtypes.PluginContext, connectionID string, ) error
func (*ResourcePluginClient) Update ¶
func (r *ResourcePluginClient) Update( ctx *pkgtypes.PluginContext, key string, input types.UpdateInput, ) (*types.UpdateResult, error)
func (*ResourcePluginClient) UpdateConnection ¶
func (r *ResourcePluginClient) UpdateConnection( ctx *pkgtypes.PluginContext, conn pkgtypes.Connection, ) (pkgtypes.Connection, error)
type ResourcePluginServer ¶
type ResourcePluginServer struct { // This is the real implementation Impl types.ResourceProvider }
Here is the gRPC server that GRPCClient talks to.
func (*ResourcePluginServer) Create ¶
func (s *ResourcePluginServer) Create( ctx context.Context, in *proto.CreateRequest, ) (*proto.CreateResponse, error)
func (*ResourcePluginServer) Delete ¶
func (s *ResourcePluginServer) Delete( ctx context.Context, in *proto.DeleteRequest, ) (*proto.DeleteResponse, error)
func (*ResourcePluginServer) DeleteConnection ¶
func (s *ResourcePluginServer) DeleteConnection( ctx context.Context, in *proto.ConnectionRequest, ) (*emptypb.Empty, error)
func (*ResourcePluginServer) Find ¶
func (s *ResourcePluginServer) Find( ctx context.Context, in *proto.FindRequest, ) (*proto.FindResponse, error)
func (*ResourcePluginServer) Get ¶
func (s *ResourcePluginServer) Get( ctx context.Context, in *proto.GetRequest, ) (*proto.GetResponse, error)
func (*ResourcePluginServer) GetConnection ¶
func (s *ResourcePluginServer) GetConnection( ctx context.Context, in *proto.ConnectionRequest, ) (*proto.Connection, error)
func (*ResourcePluginServer) GetConnectionNamespaces ¶
func (s *ResourcePluginServer) GetConnectionNamespaces( ctx context.Context, in *proto.ConnectionRequest, ) (*proto.ConnectionNamespacesResponse, error)
func (*ResourcePluginServer) GetDefaultLayout ¶
func (*ResourcePluginServer) GetLayout ¶
func (s *ResourcePluginServer) GetLayout( _ context.Context, in *proto.GetLayoutRequest, ) (*proto.Layout, error)
func (*ResourcePluginServer) GetResourceDefinition ¶
func (s *ResourcePluginServer) GetResourceDefinition( _ context.Context, in *proto.ResourceTypeRequest, ) (*proto.ResourceDefinition, error)
func (*ResourcePluginServer) GetResourceGroup ¶
func (s *ResourcePluginServer) GetResourceGroup( _ context.Context, in *proto.ResourceGroupRequest, ) (*proto.ResourceGroup, error)
func (*ResourcePluginServer) GetResourceGroups ¶
func (s *ResourcePluginServer) GetResourceGroups( _ context.Context, in *proto.ResourceGroupListRequest, ) (*proto.ResourceGroupListResponse, error)
func (*ResourcePluginServer) GetResourceType ¶
func (s *ResourcePluginServer) GetResourceType( _ context.Context, in *proto.ResourceTypeRequest, ) (*proto.ResourceMeta, error)
func (*ResourcePluginServer) GetResourceTypes ¶
func (s *ResourcePluginServer) GetResourceTypes( _ context.Context, in *proto.ResourceTypeListRequest, ) (*proto.ResourceTypes, error)
func (*ResourcePluginServer) HasInformer ¶
func (s *ResourcePluginServer) HasInformer( ctx context.Context, in *proto.HasInformerRequest, ) (*wrapperspb.BoolValue, error)
func (*ResourcePluginServer) HasResourceType ¶
func (s *ResourcePluginServer) HasResourceType( _ context.Context, in *proto.ResourceTypeRequest, ) (*wrapperspb.BoolValue, error)
func (*ResourcePluginServer) List ¶
func (s *ResourcePluginServer) List( ctx context.Context, in *proto.ListRequest, ) (*proto.ListResponse, error)
func (*ResourcePluginServer) ListConnections ¶
func (s *ResourcePluginServer) ListConnections( ctx context.Context, _ *emptypb.Empty, ) (*proto.ConnectionList, error)
func (*ResourcePluginServer) ListenForEvents ¶
func (s *ResourcePluginServer) ListenForEvents( _ *emptypb.Empty, stream proto.ResourcePlugin_ListenForEventsServer, ) error
Namespaceless and connectionless.
func (*ResourcePluginServer) LoadConnections ¶
func (s *ResourcePluginServer) LoadConnections( ctx context.Context, _ *emptypb.Empty, ) (*proto.ConnectionList, error)
func (*ResourcePluginServer) SetLayout ¶
func (s *ResourcePluginServer) SetLayout( _ context.Context, in *proto.SetLayoutRequest, ) (*emptypb.Empty, error)
func (*ResourcePluginServer) StartConnection ¶
func (s *ResourcePluginServer) StartConnection( ctx context.Context, in *proto.ConnectionRequest, ) (*proto.ConnectionStatus, error)
func (*ResourcePluginServer) StartConnectionInformer ¶
func (s *ResourcePluginServer) StartConnectionInformer( ctx context.Context, in *proto.StartConnectionInformerRequest, ) (*emptypb.Empty, error)
func (*ResourcePluginServer) StopConnection ¶
func (s *ResourcePluginServer) StopConnection( ctx context.Context, in *proto.ConnectionRequest, ) (*proto.Connection, error)
func (*ResourcePluginServer) StopConnectionInformer ¶
func (s *ResourcePluginServer) StopConnectionInformer( ctx context.Context, in *proto.StopConnectionInformerRequest, ) (*emptypb.Empty, error)
func (*ResourcePluginServer) Update ¶
func (s *ResourcePluginServer) Update( ctx context.Context, in *proto.UpdateRequest, ) (*proto.UpdateResponse, error)
func (*ResourcePluginServer) UpdateConnection ¶
func (s *ResourcePluginServer) UpdateConnection( ctx context.Context, in *proto.UpdateConnectionRequest, ) (*proto.Connection, error)
Click to show internal directories.
Click to hide internal directories.