Documentation
¶
Index ¶
- func VerifySignature(publicKey ed25519.PublicKey, request interface{}, signature string) error
- type WorkflowClient
- type WorkflowClientOpt
- func WithServerName(name string) WorkflowClientOpt
- func WithServerPublicKey(pub ed25519.PublicKey) WorkflowClientOpt
- func WithSigningKey(signingKey ed25519.PrivateKey) WorkflowClientOpt
- func WithWorkflowLogger(l logger.Logger) WorkflowClientOpt
- func WithWorkflowTLSCert(cert string) WorkflowClientOpt
- func WithWorkflowTransportCredentials(creds credentials.TransportCredentials) WorkflowClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WorkflowClient ¶
type WorkflowClient interface {
// Reads
GetAccountCredits(ctx context.Context, req *pb.GetAccountCreditsRequest) (*pb.GetAccountCreditsResponse, error)
BatchGetCreditsForAccounts(ctx context.Context, req *pb.BatchGetCreditsForAccountsRequest) (*pb.BatchGetCreditsForAccountsResponse, error)
// Workflow-based credit ops
ReserveCredits(ctx context.Context, req *pb.ReserveCreditsRequest) (*pb.ReserveCreditsResponse, error)
ReleaseReservation(ctx context.Context, req *pb.ReleaseReservationRequest) (*pb.ReleaseReservationResponse, error)
ConsumeCredits(ctx context.Context, req *pb.ConsumeCreditsRequest) (*pb.ConsumeCreditsResponse, error)
ConsumeReservation(ctx context.Context, req *pb.ConsumeReservationRequest) (*pb.ConsumeReservationResponse, error)
// Workflow receipt
SubmitWorkflowReceipt(ctx context.Context, req *pb.SubmitWorkflowReceiptRequest) (*pb.SubmitWorkflowReceiptResponse, error)
// Closer
Close() error
}
WorkflowClient is a specialized interface for the Workflow node use-case.
func NewWorkflowClient ¶
func NewWorkflowClient(address string, opts ...WorkflowClientOpt) (WorkflowClient, error)
type WorkflowClientOpt ¶
type WorkflowClientOpt func(*workflowConfig)
func WithServerName ¶
func WithServerName(name string) WorkflowClientOpt
WithServerName allows overriding the expected server name in the TLS certificate.
func WithServerPublicKey ¶
func WithServerPublicKey(pub ed25519.PublicKey) WorkflowClientOpt
func WithSigningKey ¶
func WithSigningKey(signingKey ed25519.PrivateKey) WorkflowClientOpt
func WithWorkflowLogger ¶
func WithWorkflowLogger(l logger.Logger) WorkflowClientOpt
func WithWorkflowTLSCert ¶
func WithWorkflowTLSCert(cert string) WorkflowClientOpt
func WithWorkflowTransportCredentials ¶
func WithWorkflowTransportCredentials(creds credentials.TransportCredentials) WorkflowClientOpt
Click to show internal directories.
Click to hide internal directories.