client

package
v0.0.2-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultClientAPIVersion indicates the default ApiVersion of the client.
	DefaultClientAPIVersion = "v1beta3"
	VersionV1beta3          = "v1beta3"
)

Variables

View Source
var (
	ErrInvalidLengthAkash        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAkash          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAkash = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthClientInfo        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClientInfo          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClientInfo = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrUnknownClientVersion = errors.New("akash-api: unknown client version")
)

Functions

func DiscoverClient

func DiscoverClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn, opts ...cltypes.ClientOption) error

DiscoverClient queries an RPC node to get the version of the client and executes a SetupFn function passing a new versioned Client instance as parameter. If any error occurs when calling the RPC node or the Cosmos SDK client Context is set to offline the default value of DefaultClientApiVersion will be used. An error is returned if client discovery is not successful.

func DiscoverLightClient

func DiscoverLightClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn) error

func DiscoverQueryClient

func DiscoverQueryClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn) error

DiscoverQueryClient queries an RPC node to get the version of the client and executes a SetupFn function passing a new versioned QueryClient instance as parameter. If any error occurs when calling the RPC node or the Cosmos SDK client Context is set to offline the default value of DefaultClientApiVersion will be used. An error is returned if client discovery is not successful.

Types

type Akash

type Akash struct {
	ClientInfo *ClientInfo `protobuf:"bytes,1,opt,name=client_info,json=clientInfo,proto3" json:"client_info" yaml:"client_info"`
}

Akash akash specific RPC parameters

func RPCAkash

func RPCAkash(_ *cmtrpctypes.Context) (*Akash, error)

func (*Akash) Descriptor

func (*Akash) Descriptor() ([]byte, []int)

func (*Akash) GetClientInfo

func (m *Akash) GetClientInfo() *ClientInfo

func (*Akash) Marshal

func (m *Akash) Marshal() (dAtA []byte, err error)

func (*Akash) MarshalTo

func (m *Akash) MarshalTo(dAtA []byte) (int, error)

func (*Akash) MarshalToSizedBuffer

func (m *Akash) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Akash) ProtoMessage

func (*Akash) ProtoMessage()

func (*Akash) Reset

func (m *Akash) Reset()

func (*Akash) Size

func (m *Akash) Size() (n int)

func (*Akash) String

func (m *Akash) String() string

func (*Akash) Unmarshal

func (m *Akash) Unmarshal(dAtA []byte) error

func (*Akash) XXX_DiscardUnknown

func (m *Akash) XXX_DiscardUnknown()

func (*Akash) XXX_Marshal

func (m *Akash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Akash) XXX_Merge

func (m *Akash) XXX_Merge(src proto.Message)

func (*Akash) XXX_Size

func (m *Akash) XXX_Size() int

func (*Akash) XXX_Unmarshal

func (m *Akash) XXX_Unmarshal(b []byte) error

type ClientInfo

type ClientInfo struct {
	ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version" yaml:"api_version"`
}

ClientInfo akash specific client info

func (*ClientInfo) Descriptor

func (*ClientInfo) Descriptor() ([]byte, []int)

func (*ClientInfo) GetApiVersion

func (m *ClientInfo) GetApiVersion() string

func (*ClientInfo) Marshal

func (m *ClientInfo) Marshal() (dAtA []byte, err error)

func (*ClientInfo) MarshalTo

func (m *ClientInfo) MarshalTo(dAtA []byte) (int, error)

func (*ClientInfo) MarshalToSizedBuffer

func (m *ClientInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) Reset

func (m *ClientInfo) Reset()

func (*ClientInfo) Size

func (m *ClientInfo) Size() (n int)

func (*ClientInfo) String

func (m *ClientInfo) String() string

func (*ClientInfo) Unmarshal

func (m *ClientInfo) Unmarshal(dAtA []byte) error

func (*ClientInfo) XXX_DiscardUnknown

func (m *ClientInfo) XXX_DiscardUnknown()

func (*ClientInfo) XXX_Marshal

func (m *ClientInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientInfo) XXX_Merge

func (m *ClientInfo) XXX_Merge(src proto.Message)

func (*ClientInfo) XXX_Size

func (m *ClientInfo) XXX_Size() int

func (*ClientInfo) XXX_Unmarshal

func (m *ClientInfo) XXX_Unmarshal(b []byte) error

type SetupFn

type SetupFn func(interface{}) error

SetupFn defines a function that takes a parameter, ideally a Client or QueryClient. These functions must validate the client and make it accessible.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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