Documentation
¶
Overview ¶
Package executionclient implements the private mTLS client and placement adapter for the independently deployed Kubernetes execution provider.
Index ¶
- func LoadTLSConfig(files TLSFiles) (*tls.Config, error)
- type Client
- func (c *Client) AbortReference(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) AcquireRun(ctx context.Context, req executionenv.RunClaimRequest) (executionenv.RunClaim, error)
- func (c *Client) Attach(ctx context.Context, req executionenv.AttachEnvironmentRequest) (executionenv.AttachEnvironmentResponse, error)
- func (c *Client) CancelCommand(ctx context.Context, req executionenv.CommandQueryRequest) (executionenv.CommandStatusResponse, error)
- func (c *Client) CancelReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) Close()
- func (c *Client) CommandStatus(ctx context.Context, req executionenv.CommandQueryRequest) (executionenv.CommandStatusResponse, error)
- func (c *Client) CommitReference(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) ConfirmReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) DeleteRetiredEnvironment(ctx context.Context, ref executionenv.EnvironmentRef, owner executionenv.Owner, ...) error
- func (c *Client) EnsureTemplate(ctx context.Context, binding, id, revision string, owner executionenv.Owner, ...) (executionenv.EnsureEnvironmentResponse, error)
- func (c *Client) File(ctx context.Context, req executionenv.FileRequest) (executionenv.FileResponse, error)
- func (c *Client) FindReferenceIntent(ctx context.Context, owner executionenv.Owner, ...) (executionenv.ReferenceIntent, error)
- func (c *Client) Invoke(ctx context.Context, method string, args, reply any, opts ...grpc.CallOption) error
- func (c *Client) ListAllReferenceIntents(ctx context.Context) ([]executionenv.ReferenceIntent, error)
- func (c *Client) ListExecutionTemplates(ctx context.Context) (*executionv1.ListExecutionTemplatesResponse, error)
- func (c *Client) ListReferenceIntents(ctx context.Context, owner executionenv.Owner) ([]executionenv.ReferenceIntent, error)
- func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error)
- func (c *Client) PrepareReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) RecoverEnvironment(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
- func (c *Client) ReleaseReference(ctx context.Context, req executionenv.ReferenceReleaseRequest) error
- func (c *Client) ReleaseRun(ctx context.Context, req executionenv.RunClaimRequest) error
- func (c *Client) ReloadTLS() error
- func (c *Client) RenewRun(ctx context.Context, req executionenv.RunClaimRequest) (executionenv.RunClaim, error)
- func (c *Client) ReplaceExecutor(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
- func (c *Client) ReserveSuccessor(ctx context.Context, req executionenv.ReferenceRequest) error
- func (c *Client) RetireEnvironment(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
- func (c *Client) RevokeEnvironment(ctx context.Context, ref executionenv.EnvironmentRef, owner executionenv.Owner, ...) (uint64, error)
- func (c *Client) RunTLSReload(ctx context.Context, interval time.Duration)
- func (c *Client) StartCommand(ctx context.Context, req executionenv.CommandStartRequest) (executionenv.CommandStartResponse, error)
- func (c *Client) ValidateTemplate(ctx context.Context, id, revision string) (*executionv1.ValidateTemplateResponse, error)
- type Provider
- func (p *Provider) AcquireRun(ctx context.Context, req server.ExecutionRunRequest) (server.ExecutionRunHandle, error)
- func (p *Provider) Applies(ref session.EnvironmentRef) bool
- func (p *Provider) Bind(ctx context.Context, req server.PlacementBindRequest) (server.PlacementBinding, error)
- func (p *Provider) CancelReferenceIntentDelete(ctx context.Context, intent server.ReferenceIntent) error
- func (p *Provider) CommitReferenceIntent(ctx context.Context, intent server.ReferenceIntent) error
- func (p *Provider) ConfirmReferenceIntentDelete(ctx context.Context, intent server.ReferenceIntent) error
- func (p *Provider) ListExecutionTemplates(ctx context.Context, principal *session.Principal) ([]server.ExecutionTemplateInfo, string, error)
- func (p *Provider) ListReferenceIntents(ctx context.Context, limit int) ([]server.ReferenceIntent, error)
- func (p *Provider) PrepareReferenceDelete(ctx context.Context, req server.PlacementSuccessorRequest) (server.ReferenceDeleteHandle, error)
- func (p *Provider) Reattach(ctx context.Context, req server.PlacementReattachRequest) (server.PlacementBinding, error)
- func (p *Provider) ReserveSuccessor(ctx context.Context, req server.PlacementSuccessorRequest) (server.PlacementBinding, error)
- func (p *Provider) ValidatePlacement(ctx context.Context) error
- type TLSFiles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a bounded client for the private execution-provider gRPC API.
func New ¶
New constructs a production mTLS execution-provider client. Endpoint is a plain host:port authority; URI schemes and alternate resolvers are rejected.
func NewWithTLSFiles ¶ added in v0.0.48
NewWithTLSFiles owns a reloadable connection; invalid material withdraws active authority instead of allowing a stale channel to continue.
func (*Client) AbortReference ¶
func (c *Client) AbortReference(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) AcquireRun ¶
func (c *Client) AcquireRun(ctx context.Context, req executionenv.RunClaimRequest) (executionenv.RunClaim, error)
AcquireRun acquires one environment-wide run claim.
func (*Client) Attach ¶
func (c *Client) Attach(ctx context.Context, req executionenv.AttachEnvironmentRequest) (executionenv.AttachEnvironmentResponse, error)
Attach obtains current allocation state for an exact environment reference.
func (*Client) CancelCommand ¶
func (c *Client) CancelCommand(ctx context.Context, req executionenv.CommandQueryRequest) (executionenv.CommandStatusResponse, error)
CancelCommand cancels a command after the request has been authorized.
func (*Client) CancelReferenceDelete ¶
func (c *Client) CancelReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) CommandStatus ¶
func (c *Client) CommandStatus(ctx context.Context, req executionenv.CommandQueryRequest) (executionenv.CommandStatusResponse, error)
CommandStatus queries a command after the request has been authorized.
func (*Client) CommitReference ¶
func (c *Client) CommitReference(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) ConfirmReferenceDelete ¶
func (c *Client) ConfirmReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) DeleteRetiredEnvironment ¶
func (c *Client) DeleteRetiredEnvironment(ctx context.Context, ref executionenv.EnvironmentRef, owner executionenv.Owner, expectedPVCUID, operationID string) error
DeleteRetiredEnvironment deletes retained storage after retirement proof.
func (*Client) EnsureTemplate ¶ added in v0.0.48
func (c *Client) EnsureTemplate(ctx context.Context, binding, id, revision string, owner executionenv.Owner, operationID string) (executionenv.EnsureEnvironmentResponse, error)
func (*Client) File ¶
func (c *Client) File(ctx context.Context, req executionenv.FileRequest) (executionenv.FileResponse, error)
File executes one authorized filesystem operation.
func (*Client) FindReferenceIntent ¶
func (c *Client) FindReferenceIntent(ctx context.Context, owner executionenv.Owner, environment executionenv.EnvironmentRef, binding string) (executionenv.ReferenceIntent, error)
func (*Client) Invoke ¶ added in v0.0.48
func (c *Client) Invoke(ctx context.Context, method string, args, reply any, opts ...grpc.CallOption) error
Invoke pins the transport for the complete RPC, including its terminal reply.
func (*Client) ListAllReferenceIntents ¶
func (c *Client) ListAllReferenceIntents(ctx context.Context) ([]executionenv.ReferenceIntent, error)
func (*Client) ListExecutionTemplates ¶ added in v0.0.48
func (c *Client) ListExecutionTemplates(ctx context.Context) (*executionv1.ListExecutionTemplatesResponse, error)
ListExecutionTemplates returns only operator-authorized display projections.
func (*Client) ListReferenceIntents ¶
func (c *Client) ListReferenceIntents(ctx context.Context, owner executionenv.Owner) ([]executionenv.ReferenceIntent, error)
func (*Client) NewStream ¶ added in v0.0.48
func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
func (*Client) PrepareReferenceDelete ¶
func (c *Client) PrepareReferenceDelete(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) RecoverEnvironment ¶
func (c *Client) RecoverEnvironment(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
RecoverEnvironment clears a fence only after the provider verifies exact terminal evidence.
func (*Client) ReleaseReference ¶
func (c *Client) ReleaseReference(ctx context.Context, req executionenv.ReferenceReleaseRequest) error
ReleaseReference releases one durable binding reference.
func (*Client) ReleaseRun ¶
func (c *Client) ReleaseRun(ctx context.Context, req executionenv.RunClaimRequest) error
func (*Client) ReloadTLS ¶ added in v0.0.48
ReloadTLS publishes a complete, stable identity/trust bundle. Only same-identity renewal under unchanged trust may drain existing RPCs; withdrawal closes them.
func (*Client) RenewRun ¶
func (c *Client) RenewRun(ctx context.Context, req executionenv.RunClaimRequest) (executionenv.RunClaim, error)
func (*Client) ReplaceExecutor ¶
func (c *Client) ReplaceExecutor(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
ReplaceExecutor requests UID-checked administrative executor replacement.
func (*Client) ReserveSuccessor ¶
func (c *Client) ReserveSuccessor(ctx context.Context, req executionenv.ReferenceRequest) error
func (*Client) RetireEnvironment ¶
func (c *Client) RetireEnvironment(ctx context.Context, req executionenv.RetireEnvironmentRequest) error
RetireEnvironment requests administrative retirement.
func (*Client) RevokeEnvironment ¶
func (c *Client) RevokeEnvironment(ctx context.Context, ref executionenv.EnvironmentRef, owner executionenv.Owner, expectedGeneration uint64, operationID string) (uint64, error)
RevokeEnvironment atomically fences active runs and replays a matching operation receipt.
func (*Client) RunTLSReload ¶ added in v0.0.48
RunTLSReload checks projected credentials until shutdown; renewal is not independent of security-policy publication.
func (*Client) StartCommand ¶
func (c *Client) StartCommand(ctx context.Context, req executionenv.CommandStartRequest) (executionenv.CommandStartResponse, error)
StartCommand executes one foreground command.
func (*Client) ValidateTemplate ¶ added in v0.0.48
func (c *Client) ValidateTemplate(ctx context.Context, id, revision string) (*executionv1.ValidateTemplateResponse, error)
ValidateTemplate checks an exact eligible revision without allocation.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider adapts the execution service to server placement binding.
func NewTemplateProvider ¶ added in v0.0.48
NewTemplateProvider pins the deployment default to an exact execution revision.
func (*Provider) AcquireRun ¶
func (p *Provider) AcquireRun(ctx context.Context, req server.ExecutionRunRequest) (server.ExecutionRunHandle, error)
func (*Provider) Bind ¶
func (p *Provider) Bind(ctx context.Context, req server.PlacementBindRequest) (server.PlacementBinding, error)
Bind allocates the environment for the final session binding.
func (*Provider) CancelReferenceIntentDelete ¶
func (*Provider) CommitReferenceIntent ¶
func (*Provider) ConfirmReferenceIntentDelete ¶
func (*Provider) ListExecutionTemplates ¶ added in v0.0.48
func (*Provider) ListReferenceIntents ¶
func (*Provider) PrepareReferenceDelete ¶
func (p *Provider) PrepareReferenceDelete(ctx context.Context, req server.PlacementSuccessorRequest) (server.ReferenceDeleteHandle, error)
func (*Provider) Reattach ¶
func (p *Provider) Reattach(ctx context.Context, req server.PlacementReattachRequest) (server.PlacementBinding, error)
Reattach exactly resolves a persisted remote environment for its binding.
func (*Provider) ReserveSuccessor ¶
func (p *Provider) ReserveSuccessor(ctx context.Context, req server.PlacementSuccessorRequest) (server.PlacementBinding, error)
type TLSFiles ¶
type TLSFiles struct{ CA, Cert, Key, ServerName string }
TLSFiles names the runtime-only mTLS material mounted into mecak8s. TLSFiles names a complete mTLS projection. ServerName explicitly pins the verified DNS identity when the dial address is a local port-forward; empty uses the endpoint hostname for TLS verification.