types

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the module name.
	ModuleName = "registry"
)

Variables

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Query_serviceDesc = _Query_serviceDesc

Functions

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type ChainNameFunc

type ChainNameFunc func(chainID uint64) string

ChainNameFunc returns the name of the chain.

type NetworkRequest

type NetworkRequest struct {
	Id     uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Latest bool   `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"`
}

func (*NetworkRequest) Descriptor

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

func (*NetworkRequest) GetId

func (m *NetworkRequest) GetId() uint64

func (*NetworkRequest) GetLatest

func (m *NetworkRequest) GetLatest() bool

func (*NetworkRequest) Marshal

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

func (*NetworkRequest) MarshalTo

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

func (*NetworkRequest) MarshalToSizedBuffer

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

func (*NetworkRequest) ProtoMessage

func (*NetworkRequest) ProtoMessage()

func (*NetworkRequest) Reset

func (m *NetworkRequest) Reset()

func (*NetworkRequest) Size

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

func (*NetworkRequest) String

func (m *NetworkRequest) String() string

func (*NetworkRequest) Unmarshal

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

func (*NetworkRequest) XXX_DiscardUnknown

func (m *NetworkRequest) XXX_DiscardUnknown()

func (*NetworkRequest) XXX_Marshal

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

func (*NetworkRequest) XXX_Merge

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

func (*NetworkRequest) XXX_Size

func (m *NetworkRequest) XXX_Size() int

func (*NetworkRequest) XXX_Unmarshal

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

type NetworkResponse

type NetworkResponse struct {
	Id            uint64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedHeight uint64    `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"`
	Portals       []*Portal `protobuf:"bytes,3,rep,name=portals,proto3" json:"portals,omitempty"`
}

func (*NetworkResponse) Descriptor

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

func (*NetworkResponse) GetCreatedHeight

func (m *NetworkResponse) GetCreatedHeight() uint64

func (*NetworkResponse) GetId

func (m *NetworkResponse) GetId() uint64

func (*NetworkResponse) GetPortals

func (m *NetworkResponse) GetPortals() []*Portal

func (*NetworkResponse) Marshal

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

func (*NetworkResponse) MarshalTo

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

func (*NetworkResponse) MarshalToSizedBuffer

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

func (*NetworkResponse) ProtoMessage

func (*NetworkResponse) ProtoMessage()

func (*NetworkResponse) Reset

func (m *NetworkResponse) Reset()

func (*NetworkResponse) Size

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

func (*NetworkResponse) String

func (m *NetworkResponse) String() string

func (*NetworkResponse) Unmarshal

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

func (*NetworkResponse) XXX_DiscardUnknown

func (m *NetworkResponse) XXX_DiscardUnknown()

func (*NetworkResponse) XXX_Marshal

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

func (*NetworkResponse) XXX_Merge

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

func (*NetworkResponse) XXX_Size

func (m *NetworkResponse) XXX_Size() int

func (*NetworkResponse) XXX_Unmarshal

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

type Portal

type Portal struct {
	ChainId        uint64   `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	Address        []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	DeployHeight   uint64   `protobuf:"varint,3,opt,name=deploy_height,json=deployHeight,proto3" json:"deploy_height,omitempty"`
	ShardIds       []uint64 `protobuf:"varint,4,rep,packed,name=shard_ids,json=shardIds,proto3" json:"shard_ids,omitempty"`
	AttestInterval uint64   `protobuf:"varint,5,opt,name=attest_interval,json=attestInterval,proto3" json:"attest_interval,omitempty"`
	BlockPeriodNs  uint64   `protobuf:"varint,6,opt,name=block_period_ns,json=blockPeriodNs,proto3" json:"block_period_ns,omitempty"`
	Name           string   `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
}

func (*Portal) Descriptor

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

func (*Portal) GetAddress

func (m *Portal) GetAddress() []byte

func (*Portal) GetAttestInterval

func (m *Portal) GetAttestInterval() uint64

func (*Portal) GetBlockPeriodNs

func (m *Portal) GetBlockPeriodNs() uint64

func (*Portal) GetChainId

func (m *Portal) GetChainId() uint64

func (*Portal) GetDeployHeight

func (m *Portal) GetDeployHeight() uint64

func (*Portal) GetName

func (m *Portal) GetName() string

func (*Portal) GetShardIds

func (m *Portal) GetShardIds() []uint64

func (*Portal) Marshal

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

func (*Portal) MarshalTo

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

func (*Portal) MarshalToSizedBuffer

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

func (*Portal) ProtoMessage

func (*Portal) ProtoMessage()

func (*Portal) Reset

func (m *Portal) Reset()

func (*Portal) Size

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

func (*Portal) String

func (m *Portal) String() string

func (*Portal) Unmarshal

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

func (*Portal) XXX_DiscardUnknown

func (m *Portal) XXX_DiscardUnknown()

func (*Portal) XXX_Marshal

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

func (*Portal) XXX_Merge

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

func (*Portal) XXX_Size

func (m *Portal) XXX_Size() int

func (*Portal) XXX_Unmarshal

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

type PortalRegistry

type PortalRegistry interface {
	// ConfLevels returns all confirmation levels supported by all chains.
	// TODO(corver): Rename this to SupportedChainVersions
	ConfLevels(ctx context.Context) (map[uint64][]xchain.ConfLevel, error)
}

type QueryClient

type QueryClient interface {
	Network(ctx context.Context, in *NetworkRequest, opts ...grpc.CallOption) (*NetworkResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	Network(context.Context, *NetworkRequest) (*NetworkResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Network

Jump to

Keyboard shortcuts

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