gear_go

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

README

gear-go

Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnquedSubscription added in v1.0.3

type EnquedSubscription struct {
	ResponseType                 gear_client.ResponseType
	CallName, ModuleName, Method string
	Args                         []any
	IsExtrinsic                  bool
	IsCustomBuilder              bool
	CustomBuilderKeyRing         keyring.IKeyRing
	CustomFunc                   func() error
	AfterFinalizationFunc        func() error
}

func NewEnq added in v1.0.3

func NewEnq(responseType gear_client.ResponseType, callName, module, method string, isExtr bool) *EnquedSubscription

type Gear

type Gear struct {
	// contains filtered or unexported fields
}

func NewGear

func NewGear() (*Gear, error)

NewGear creates fully functional gear-go API instance

func (*Gear) EnqueuedSubscriptions added in v1.0.2

func (gear *Gear) EnqueuedSubscriptions(methods []string, rtypes []gear_client.ResponseType, callNames, moduleNames []string, args [][]any, interruptions ...*Interruption) SubscriptionFunc

EnqueuedSubscriptions is

func (*Gear) EnqueuedSubscriptionsOptional added in v1.0.3

func (gear *Gear) EnqueuedSubscriptionsOptional(enq []*EnquedSubscription, interruptions ...*Interruption) SubscriptionFunc

func (*Gear) EventsSubscription added in v1.0.2

func (gear *Gear) EventsSubscription() SubscriptionFunc

EventsSubscription implements state_subscribeStorage method

as it is shown in "example/code/example_subscription_upload" (line 23) example function is added via MergeSubscriptionFunctions

func (*Gear) GetCalls added in v1.0.2

func (gear *Gear) GetCalls() *calls.Calls

func (*Gear) GetClient

func (gear *Gear) GetClient() gear_client.IClient

func (*Gear) GetConfig

func (gear *Gear) GetConfig() *config.Scheme

func (*Gear) GetMeta added in v1.0.0

func (gear *Gear) GetMeta() *metadata.Metadata

func (*Gear) GetRPC added in v1.0.0

func (gear *Gear) GetRPC() gear_rpc.IGearRPC

func (*Gear) GetWsClient added in v1.0.0

func (gear *Gear) GetWsClient() gear_client.IWsClient

func (*Gear) InitSubscriptions added in v1.0.2

func (gear *Gear) InitSubscriptions() error

InitSubscriptions is the main func to handle ws subscriptions Required both AddResponseTypesAndMakeWsConnectionsPool and MergeSubscriptionFunctions had been called before using as it is shown in "example/code/example_subscription_upload" example

func (*Gear) MergeSubscriptionFunctions added in v1.0.2

func (gear *Gear) MergeSubscriptionFunctions(fo ...SubscriptionFunc)

func (*Gear) SubmitAndWatchExtrinsic added in v1.0.2

func (gear *Gear) SubmitAndWatchExtrinsic(args []any, t string) SubscriptionFunc

type Interruption added in v1.0.3

type Interruption struct {
	InterruptFunc     func() ([]any, error)
	InterruptionCause string
}

func NewInterruption added in v1.0.3

func NewInterruption(interruptionCause string, interFunc func() ([]any, error)) *Interruption

type SendMessage added in v1.0.3

type SendMessage struct {
	Destination string `json:"destination"`
	Payload     string `json:"payload"`
	GasLimit    int    `json:"gas_limit"`
	Value       string `json:"value"`
	KeepAlive   bool   `json:"keep_alive"`
}

type SubscriptionFunc added in v1.0.2

type SubscriptionFunc func() error

SubscriptionFunc is a subscription builder func

Jump to

Keyboard shortcuts

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