Documentation
¶
Overview ¶
Package connshare brokers invocation-scoped access to another plugin's resources.
Index ¶
- type Resources
- type Service
- func (s *Service) Begin(ctx context.Context, owner string, route v2.AccessRoute, ...) ([]byte, func(), error)
- func (s *Service) Catalog(ctx context.Context, token []byte, owner string, req v2.CatalogRequest) (v2.Catalog, error)
- func (s *Service) Close()
- func (s *Service) Enumerate(ctx context.Context, token []byte, owner, id string, req v2.EnumerateRequest) (v2.SourcePage, error)
- func (s *Service) Get(ctx context.Context, token []byte, owner, id string, req v2.GetRequest) (v2.Record, error)
- func (s *Service) GetSchemaDocument(ctx context.Context, token []byte, owner string, route v2.AccessRoute, ...) (v2.SchemaDocument, error)
- func (s *Service) ResolveTarget(ctx context.Context, token []byte, owner string, ...) (hostconnections.ResolvedTarget, error)
- func (s *Service) RetireConnection(owner, connection string)
- func (s *Service) RetireOwner(owner string)
- func (s *Service) Update(ctx context.Context, token []byte, owner, id string, req v2.MutationRequest) (v2.Record, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resources ¶
type Resources interface {
ObserveCatalog(context.Context, string, v2.AccessRoute) (v2.Catalog, resource.Observation, error)
Catalog(context.Context, string, v2.CatalogRequest) (v2.Catalog, error)
ResolveTarget(context.Context, string, resource.ResolveTargetRequest) (resource.ResolvedTarget, error)
GetSchemaDocument(context.Context, string, v2.AccessRoute, v2.SchemaDocumentReference) (v2.SchemaDocument, error)
Get(context.Context, string, resource.HostGetRequest) (resource.HostRecord, error)
Enumerate(context.Context, string, resource.HostEnumerateRequest) (resource.HostSourcePage, error)
Mutate(context.Context, string, v2.MutationRequest) (v2.Record, error)
}
Resources is the host resource boundary, not the owner's native client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is bound to exactly one consumer process. Close retires all its calls.
func (*Service) Begin ¶
func (s *Service) Begin(ctx context.Context, owner string, route v2.AccessRoute, grant config.ConnectionGrant, readonly bool, validate func() error) ([]byte, func(), error)
Begin pins one owner catalog and installs its authority on the admitted call. validate must check current manifests, owner process, connection state and grants.
func (*Service) Enumerate ¶
func (s *Service) Enumerate(ctx context.Context, token []byte, owner, id string, req v2.EnumerateRequest) (v2.SourcePage, error)
func (*Service) GetSchemaDocument ¶
func (s *Service) GetSchemaDocument(ctx context.Context, token []byte, owner string, route v2.AccessRoute, ref v2.SchemaDocumentReference) (v2.SchemaDocument, error)
func (*Service) ResolveTarget ¶
func (s *Service) ResolveTarget(ctx context.Context, token []byte, owner string, req hostconnections.ResolveTargetRequest) (hostconnections.ResolvedTarget, error)
func (*Service) RetireConnection ¶
RetireConnection cancels every capability for a changing owner route.
func (*Service) RetireOwner ¶
RetireOwner cancels calls that borrowed a retired owner process.