Documentation
¶
Overview ¶
Package adapters implements the narrow client interfaces the workflow engine's step executors depend on (steps.ChainClient and steps.ProviderClient), backed by the real Akash node and provider gateway clients.
Index ¶
- func NewChainClient(cl aclient.Client, inputs ...*DeploymentInputs) steps.ChainClient
- func NewConsoleChainClient(cc *console.Client, chainQueries steps.ChainClient, root, ctxName string, ...) steps.ChainClient
- func NewProviderClient(cctx sdkclient.Context, authType string, inputs ...*DeploymentInputs) steps.ProviderClient
- func ResolveChainDepositValue(ctx context.Context, cl aclient.LightClient, depositStr string) (string, error)
- type DeploymentInputs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChainClient ¶
func NewChainClient(cl aclient.Client, inputs ...*DeploymentInputs) steps.ChainClient
NewChainClient wraps an Akash node client into the narrow interface the workflow step executors use to broadcast transactions and run queries.
func NewConsoleChainClient ¶
func NewConsoleChainClient(cc *console.Client, chainQueries steps.ChainClient, root, ctxName string, inputs ...*DeploymentInputs) steps.ChainClient
NewConsoleChainClient wraps a Console API client into the workflow steps.ChainClient interface. chainQueries, when non-nil, handles query steps directly against the chain. Inputs keep secret values outside workflow state; Console owns saved definitions and provider manifests.
func NewProviderClient ¶
func NewProviderClient(cctx sdkclient.Context, authType string, inputs ...*DeploymentInputs) steps.ProviderClient
NewProviderClient creates a workflow provider client. authType is "jwt" (default when empty) or "mtls", matching internal/provider.NewGatewayClient.
func ResolveChainDepositValue ¶ added in v0.1.0
func ResolveChainDepositValue(ctx context.Context, cl aclient.LightClient, depositStr string) (string, error)
ResolveChainDepositValue returns the exact coin the chain adapter will put on a deployment message. Planning and execution share this function so an auto dry-run cannot advertise a value different from the broadcast path.
Types ¶
type DeploymentInputs ¶ added in v1.0.1
type DeploymentInputs struct {
// contains filtered or unexported fields
}
DeploymentInputs belongs to one workflow invocation. Prepared chain SDLs stay here so transaction construction and provider delivery use identical bytes without putting expanded configuration into workflow state or files.
func NewDeploymentInputs ¶ added in v1.0.1
func NewDeploymentInputs(root, contextName string, input io.Reader) *DeploymentInputs
NewDeploymentInputs creates the private input state shared by one run's transaction and provider adapters. Input is used only for a secrets-file of -.
func (*DeploymentInputs) ValidateChain ¶ added in v1.0.1
func (d *DeploymentInputs) ValidateChain(ctx context.Context, owner string, params map[string]string) error
ValidateChain resolves the same source and patch as execution without reading secret values or retaining an expanded SDL. A resolved deposit additionally checks the denomination of every deployment group. An omitted owner requires an unambiguous source deployment in the context store.