chainpb

package
v0.0.0-...-c15509c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChainService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chain.ChainService",
	HandlerType: (*ChainServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHead",
			Handler:    _ChainService_GetHead_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _ChainService_GetStatus_Handler,
		},
		{
			MethodName: "GetMetaByHeight",
			Handler:    _ChainService_GetMetaByHeight_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/chain/chainpb/chain.proto",
}

ChainService_ServiceDesc is the grpc.ServiceDesc for ChainService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_grpc_chain_chainpb_chain_proto protoreflect.FileDescriptor

Functions

func RegisterChainServiceServer

func RegisterChainServiceServer(s grpc.ServiceRegistrar, srv ChainServiceServer)

Types

type ChainServiceClient

type ChainServiceClient interface {
	GetHead(ctx context.Context, in *GetHeadRequest, opts ...grpc.CallOption) (*GetHeadResponse, error)
	GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
	GetMetaByHeight(ctx context.Context, in *GetMetaByHeightRequest, opts ...grpc.CallOption) (*GetMetaByHeightResponse, error)
}

ChainServiceClient is the client API for ChainService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ChainServiceServer

type ChainServiceServer interface {
	GetHead(context.Context, *GetHeadRequest) (*GetHeadResponse, error)
	GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
	GetMetaByHeight(context.Context, *GetMetaByHeightRequest) (*GetMetaByHeightResponse, error)
	// contains filtered or unexported methods
}

ChainServiceServer is the server API for ChainService service. All implementations must embed UnimplementedChainServiceServer for forward compatibility

type GetHeadRequest

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

func (*GetHeadRequest) Descriptor deprecated

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

Deprecated: Use GetHeadRequest.ProtoReflect.Descriptor instead.

func (*GetHeadRequest) ProtoMessage

func (*GetHeadRequest) ProtoMessage()

func (*GetHeadRequest) ProtoReflect

func (x *GetHeadRequest) ProtoReflect() protoreflect.Message

func (*GetHeadRequest) Reset

func (x *GetHeadRequest) Reset()

func (*GetHeadRequest) String

func (x *GetHeadRequest) String() string

type GetHeadResponse

type GetHeadResponse struct {
	Height  int64                  `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Time    *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	Session int64                  `protobuf:"varint,3,opt,name=session,proto3" json:"session,omitempty"`
	Era     int64                  `protobuf:"varint,4,opt,name=era,proto3" json:"era,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHeadResponse) Descriptor deprecated

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

Deprecated: Use GetHeadResponse.ProtoReflect.Descriptor instead.

func (*GetHeadResponse) GetEra

func (x *GetHeadResponse) GetEra() int64

func (*GetHeadResponse) GetHeight

func (x *GetHeadResponse) GetHeight() int64

func (*GetHeadResponse) GetSession

func (x *GetHeadResponse) GetSession() int64

func (*GetHeadResponse) GetTime

func (x *GetHeadResponse) GetTime() *timestamppb.Timestamp

func (*GetHeadResponse) ProtoMessage

func (*GetHeadResponse) ProtoMessage()

func (*GetHeadResponse) ProtoReflect

func (x *GetHeadResponse) ProtoReflect() protoreflect.Message

func (*GetHeadResponse) Reset

func (x *GetHeadResponse) Reset()

func (*GetHeadResponse) String

func (x *GetHeadResponse) String() string

type GetMetaByHeightRequest

type GetMetaByHeightRequest struct {
	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMetaByHeightRequest) Descriptor deprecated

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

Deprecated: Use GetMetaByHeightRequest.ProtoReflect.Descriptor instead.

func (*GetMetaByHeightRequest) GetHeight

func (x *GetMetaByHeightRequest) GetHeight() int64

func (*GetMetaByHeightRequest) ProtoMessage

func (*GetMetaByHeightRequest) ProtoMessage()

func (*GetMetaByHeightRequest) ProtoReflect

func (x *GetMetaByHeightRequest) ProtoReflect() protoreflect.Message

func (*GetMetaByHeightRequest) Reset

func (x *GetMetaByHeightRequest) Reset()

func (*GetMetaByHeightRequest) String

func (x *GetMetaByHeightRequest) String() string

type GetMetaByHeightResponse

type GetMetaByHeightResponse struct {
	Time            *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	Session         int64                  `protobuf:"varint,2,opt,name=session,proto3" json:"session,omitempty"`
	Era             int64                  `protobuf:"varint,3,opt,name=era,proto3" json:"era,omitempty"`
	LastInSession   bool                   `protobuf:"varint,4,opt,name=last_in_session,json=lastInSession,proto3" json:"last_in_session,omitempty"`
	LastInEra       bool                   `protobuf:"varint,5,opt,name=last_in_era,json=lastInEra,proto3" json:"last_in_era,omitempty"`
	Chain           string                 `protobuf:"bytes,6,opt,name=chain,proto3" json:"chain,omitempty"`
	SpecVersion     string                 `protobuf:"bytes,7,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"`
	LastInActiveEra bool                   `protobuf:"varint,8,opt,name=lastInActiveEra,proto3" json:"lastInActiveEra,omitempty"`
	ActiveEra       int64                  `protobuf:"varint,9,opt,name=activeEra,proto3" json:"activeEra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMetaByHeightResponse) Descriptor deprecated

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

Deprecated: Use GetMetaByHeightResponse.ProtoReflect.Descriptor instead.

func (*GetMetaByHeightResponse) GetActiveEra

func (x *GetMetaByHeightResponse) GetActiveEra() int64

func (*GetMetaByHeightResponse) GetChain

func (x *GetMetaByHeightResponse) GetChain() string

func (*GetMetaByHeightResponse) GetEra

func (x *GetMetaByHeightResponse) GetEra() int64

func (*GetMetaByHeightResponse) GetLastInActiveEra

func (x *GetMetaByHeightResponse) GetLastInActiveEra() bool

func (*GetMetaByHeightResponse) GetLastInEra

func (x *GetMetaByHeightResponse) GetLastInEra() bool

func (*GetMetaByHeightResponse) GetLastInSession

func (x *GetMetaByHeightResponse) GetLastInSession() bool

func (*GetMetaByHeightResponse) GetSession

func (x *GetMetaByHeightResponse) GetSession() int64

func (*GetMetaByHeightResponse) GetSpecVersion

func (x *GetMetaByHeightResponse) GetSpecVersion() string

func (*GetMetaByHeightResponse) GetTime

func (*GetMetaByHeightResponse) ProtoMessage

func (*GetMetaByHeightResponse) ProtoMessage()

func (*GetMetaByHeightResponse) ProtoReflect

func (x *GetMetaByHeightResponse) ProtoReflect() protoreflect.Message

func (*GetMetaByHeightResponse) Reset

func (x *GetMetaByHeightResponse) Reset()

func (*GetMetaByHeightResponse) String

func (x *GetMetaByHeightResponse) String() string

type GetStatusRequest

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

func (*GetStatusRequest) Descriptor deprecated

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

Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead.

func (*GetStatusRequest) ProtoMessage

func (*GetStatusRequest) ProtoMessage()

func (*GetStatusRequest) ProtoReflect

func (x *GetStatusRequest) ProtoReflect() protoreflect.Message

func (*GetStatusRequest) Reset

func (x *GetStatusRequest) Reset()

func (*GetStatusRequest) String

func (x *GetStatusRequest) String() string

type GetStatusResponse

type GetStatusResponse struct {
	ClientInfo       string            `protobuf:"bytes,1,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	ChainName        string            `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"`
	ChainType        string            `protobuf:"bytes,3,opt,name=chain_type,json=chainType,proto3" json:"chain_type,omitempty"`
	NodeName         string            `protobuf:"bytes,4,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	NodeHealth       string            `protobuf:"bytes,5,opt,name=node_health,json=nodeHealth,proto3" json:"node_health,omitempty"`
	NodeRoles        []string          `protobuf:"bytes,6,rep,name=node_roles,json=nodeRoles,proto3" json:"node_roles,omitempty"`
	NodeVersion      string            `protobuf:"bytes,7,opt,name=node_version,json=nodeVersion,proto3" json:"node_version,omitempty"`
	NodeLocalPeerUid string            `protobuf:"bytes,8,opt,name=node_local_peer_uid,json=nodeLocalPeerUid,proto3" json:"node_local_peer_uid,omitempty"`
	NodeProperties   map[string]string `` /* 191-byte string literal not displayed */
	GenesisHash      string            `protobuf:"bytes,10,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStatusResponse) Descriptor deprecated

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

Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead.

func (*GetStatusResponse) GetChainName

func (x *GetStatusResponse) GetChainName() string

func (*GetStatusResponse) GetChainType

func (x *GetStatusResponse) GetChainType() string

func (*GetStatusResponse) GetClientInfo

func (x *GetStatusResponse) GetClientInfo() string

func (*GetStatusResponse) GetGenesisHash

func (x *GetStatusResponse) GetGenesisHash() string

func (*GetStatusResponse) GetNodeHealth

func (x *GetStatusResponse) GetNodeHealth() string

func (*GetStatusResponse) GetNodeLocalPeerUid

func (x *GetStatusResponse) GetNodeLocalPeerUid() string

func (*GetStatusResponse) GetNodeName

func (x *GetStatusResponse) GetNodeName() string

func (*GetStatusResponse) GetNodeProperties

func (x *GetStatusResponse) GetNodeProperties() map[string]string

func (*GetStatusResponse) GetNodeRoles

func (x *GetStatusResponse) GetNodeRoles() []string

func (*GetStatusResponse) GetNodeVersion

func (x *GetStatusResponse) GetNodeVersion() string

func (*GetStatusResponse) ProtoMessage

func (*GetStatusResponse) ProtoMessage()

func (*GetStatusResponse) ProtoReflect

func (x *GetStatusResponse) ProtoReflect() protoreflect.Message

func (*GetStatusResponse) Reset

func (x *GetStatusResponse) Reset()

func (*GetStatusResponse) String

func (x *GetStatusResponse) String() string

type UnimplementedChainServiceServer

type UnimplementedChainServiceServer struct {
}

UnimplementedChainServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChainServiceServer) GetHead

func (UnimplementedChainServiceServer) GetMetaByHeight

func (UnimplementedChainServiceServer) GetStatus

type UnsafeChainServiceServer

type UnsafeChainServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeChainServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChainServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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