sdkimpl

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRuntime

type NodeRuntime struct {
	RuntimeBase
}

func (*NodeRuntime) IsNodeRuntime

func (n *NodeRuntime) IsNodeRuntime()

type Runtime

type Runtime struct {
	RuntimeBase
	// contains filtered or unexported fields
}

func (*Runtime) GenerateReport added in v0.2.0

func (d *Runtime) GenerateReport(request *sdk.ReportRequest) cre.Promise[*cre.Report]

func (*Runtime) GetSecret

func (d *Runtime) GetSecret(req *sdk.SecretRequest) cre.Promise[*sdk.Secret]

func (*Runtime) RunInNodeMode

func (d *Runtime) RunInNodeMode(fn func(nodeRuntime cre.NodeRuntime) *sdk.SimpleConsensusInputs) cre.Promise[values.Value]

type RuntimeBase

type RuntimeBase struct {
	MaxResponseSize uint64
	RuntimeHelpers
	Lggr *slog.Logger

	Mode sdk.Mode
	// contains filtered or unexported fields
}

func (*RuntimeBase) CallCapability

func (r *RuntimeBase) CallCapability(request *sdk.CapabilityRequest) cre.Promise[*sdk.CapabilityResponse]

func (*RuntimeBase) Int63

func (r *RuntimeBase) Int63() int64

func (*RuntimeBase) Logger added in v0.5.0

func (r *RuntimeBase) Logger() *slog.Logger

func (*RuntimeBase) Now added in v0.7.0

func (r *RuntimeBase) Now() time.Time

func (*RuntimeBase) Rand

func (r *RuntimeBase) Rand() (*rand.Rand, error)

func (*RuntimeBase) Seed

func (r *RuntimeBase) Seed(seed int64)

func (*RuntimeBase) Uint64

func (r *RuntimeBase) Uint64() uint64

type RuntimeHelpers

type RuntimeHelpers interface {
	Call(request *sdk.CapabilityRequest) error
	Await(request *sdk.AwaitCapabilitiesRequest, maxResponseSize uint64) (*sdk.AwaitCapabilitiesResponse, error)

	GetSecrets(request *sdk.GetSecretsRequest, maxResponseSize uint64) error
	AwaitSecrets(request *sdk.AwaitSecretsRequest, maxResponseSize uint64) (*sdk.AwaitSecretsResponse, error)

	SwitchModes(mode sdk.Mode)
	GetSource(mode sdk.Mode) rand.Source

	Now() time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL