graphql

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphQl

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

GraphQl for tf graphql client

func NewGraphQl

func NewGraphQl(urls ...string) (GraphQl, error)

NewGraphQl creates a new tf graphql client

func (*GraphQl) GetUpNodes

func (g *GraphQl) GetUpNodes(ctx context.Context, nodesNum int, farmID, excludeFarmID uint32, ipv4, ipv6 bool) ([]Node, error)

GetUpNodes returns a list of public nodes if nodesNum is given the query will use a limit and offset farmID id if not equal 0 will add a condition for it excludeFarmID if not equal 0 will add a condition ro exclude the farm ID ipv4 pool to set a condition for non empty ipv4 ipv6 pool to set a condition for non empty ipv6

type Node

type Node struct {
	NodeID       uint32       `graphql:"nodeID"`
	PublicConfig PublicConfig `graphql:"publicConfig"`
}

Node from graphql

type PublicConfig

type PublicConfig struct {
	Ipv4 string `graphql:"ipv4"`
	Ipv6 string `graphql:"ipv6"`
}

PublicConfig includes the public config information for the node

Jump to

Keyboard shortcuts

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