gear_go

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: GPL-3.0 Imports: 17 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 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) Get added in v1.0.0

func (gear *Gear) Get(resp *models.SubscriptionResponse) error

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) ProcessSubscriptions added in v1.0.0

func (gear *Gear) ProcessSubscriptions() error

func (*Gear) ResponsePoolRunner added in v1.0.0

func (gear *Gear) ResponsePoolRunner()

ResponsePoolRunner is the main function that handles and operates subscriptions responses.

You can add new subscription by using Subscribe function of gear.wsClient as shown below:

	 	newSubscription, err := gear.wsClient.Subscribe(args, methodName)
			...
			gear.responsePool = append(gear.responsePool, newSubscription) // the part in which new sub is added to pool
 --------------------------------------------------------------------------------------------------------------------

This function could be overwritten if config value of Subscriptions.HasCustomPoolRunner is set by true. In this case, you would have to make CustomRunner function by your own in the way it suits you

Jump to

Keyboard shortcuts

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