Documentation
¶
Overview ¶
Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)
- type EpochInfo
- func (*EpochInfo) Descriptor() ([]byte, []int)deprecated
- func (x *EpochInfo) GetCurrentEpoch() int64
- func (x *EpochInfo) GetCurrentEpochStartHeight() int64
- func (x *EpochInfo) GetCurrentEpochStartTime() *timestamppb.Timestamp
- func (x *EpochInfo) GetDuration() *durationpb.Duration
- func (x *EpochInfo) GetEpochCountingStarted() bool
- func (x *EpochInfo) GetIdentifier() string
- func (x *EpochInfo) GetStartTime() *timestamppb.Timestamp
- func (*EpochInfo) ProtoMessage()
- func (x *EpochInfo) ProtoReflect() protoreflect.Message
- func (x *EpochInfo) Reset()
- func (x *EpochInfo) String() string
- type EventEpochEnd
- type EventEpochStart
- func (*EventEpochStart) Descriptor() ([]byte, []int)deprecated
- func (x *EventEpochStart) GetEpochNumber() int64
- func (x *EventEpochStart) GetEpochStartTime() int64
- func (*EventEpochStart) ProtoMessage()
- func (x *EventEpochStart) ProtoReflect() protoreflect.Message
- func (x *EventEpochStart) Reset()
- func (x *EventEpochStart) String() string
- type GenesisState
- type QueryClient
- type QueryCurrentEpochRequest
- func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryCurrentEpochRequest) GetIdentifier() string
- func (*QueryCurrentEpochRequest) ProtoMessage()
- func (x *QueryCurrentEpochRequest) ProtoReflect() protoreflect.Message
- func (x *QueryCurrentEpochRequest) Reset()
- func (x *QueryCurrentEpochRequest) String() string
- type QueryCurrentEpochResponse
- func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryCurrentEpochResponse) GetCurrentEpoch() int64
- func (*QueryCurrentEpochResponse) ProtoMessage()
- func (x *QueryCurrentEpochResponse) ProtoReflect() protoreflect.Message
- func (x *QueryCurrentEpochResponse) Reset()
- func (x *QueryCurrentEpochResponse) String() string
- type QueryEpochInfosRequest
- type QueryEpochInfosResponse
- func (*QueryEpochInfosResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryEpochInfosResponse) GetEpochs() []*EpochInfo
- func (*QueryEpochInfosResponse) ProtoMessage()
- func (x *QueryEpochInfosResponse) ProtoReflect() protoreflect.Message
- func (x *QueryEpochInfosResponse) Reset()
- func (x *QueryEpochInfosResponse) String() string
- type QueryServer
- type UnimplementedQueryServer
- type UnsafeQueryServer
Constants ¶
const ( Query_EpochInfos_FullMethodName = "/cosmos.epochs.v1beta1.Query/EpochInfos" Query_CurrentEpoch_FullMethodName = "/cosmos.epochs.v1beta1.Query/CurrentEpoch" )
Variables ¶
var File_cosmos_epochs_v1beta1_events_proto protoreflect.FileDescriptor
var File_cosmos_epochs_v1beta1_genesis_proto protoreflect.FileDescriptor
var File_cosmos_epochs_v1beta1_query_proto protoreflect.FileDescriptor
var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.epochs.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EpochInfos", Handler: _Query_EpochInfos_Handler, }, { MethodName: "CurrentEpoch", Handler: _Query_CurrentEpoch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/epochs/v1beta1/query.proto", }
Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)
Types ¶
type EpochInfo ¶
type EpochInfo struct {
// identifier is a unique reference to this particular timer.
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// start_time is the time at which the timer first ever ticks.
// If start_time is in the future, the epoch will not begin until the start
// time.
StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// duration is the time in between epoch ticks.
// In order for intended behavior to be met, duration should
// be greater than the chains expected block time.
// Duration must be non-zero.
Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
// current_epoch is the current epoch number, or in other words,
// how many times has the timer 'ticked'.
// The first tick (current_epoch=1) is defined as
// the first block whose blocktime is greater than the EpochInfo start_time.
CurrentEpoch int64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
// current_epoch_start_time describes the start time of the current timer
// interval. The interval is (current_epoch_start_time,
// current_epoch_start_time + duration] When the timer ticks, this is set to
// current_epoch_start_time = last_epoch_start_time + duration only one timer
// tick for a given identifier can occur per block.
//
// NOTE! The current_epoch_start_time may diverge significantly from the
// wall-clock time the epoch began at. Wall-clock time of epoch start may be
// >> current_epoch_start_time. Suppose current_epoch_start_time = 10,
// duration = 5. Suppose the chain goes offline at t=14, and comes back online
// at t=30, and produces blocks at every successive time. (t=31, 32, etc.)
// * The t=30 block will start the epoch for (10, 15]
// * The t=31 block will start the epoch for (15, 20]
// * The t=32 block will start the epoch for (20, 25]
// * The t=33 block will start the epoch for (25, 30]
// * The t=34 block will start the epoch for (30, 35]
// * The **t=36** block will start the epoch for (35, 40]
CurrentEpochStartTime *timestamppb.Timestamp `` /* 128-byte string literal not displayed */
// epoch_counting_started is a boolean, that indicates whether this
// epoch timer has began yet.
EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"`
// current_epoch_start_height is the block height at which the current epoch
// started. (The block height at which the timer last ticked)
CurrentEpochStartHeight int64 `` /* 135-byte string literal not displayed */
// contains filtered or unexported fields
}
EpochInfo is a struct that describes the data going into a timer defined by the x/epochs module.
func (*EpochInfo) Descriptor
deprecated
func (*EpochInfo) GetCurrentEpoch ¶
func (*EpochInfo) GetCurrentEpochStartHeight ¶
func (*EpochInfo) GetCurrentEpochStartTime ¶
func (x *EpochInfo) GetCurrentEpochStartTime() *timestamppb.Timestamp
func (*EpochInfo) GetDuration ¶
func (x *EpochInfo) GetDuration() *durationpb.Duration
func (*EpochInfo) GetEpochCountingStarted ¶
func (*EpochInfo) GetIdentifier ¶
func (*EpochInfo) GetStartTime ¶
func (x *EpochInfo) GetStartTime() *timestamppb.Timestamp
func (*EpochInfo) ProtoMessage ¶
func (*EpochInfo) ProtoMessage()
func (*EpochInfo) ProtoReflect ¶
func (x *EpochInfo) ProtoReflect() protoreflect.Message
type EventEpochEnd ¶
type EventEpochEnd struct {
EpochNumber int64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
// contains filtered or unexported fields
}
EventEpochEnd is an event emitted when an epoch end.
func (*EventEpochEnd) Descriptor
deprecated
func (*EventEpochEnd) Descriptor() ([]byte, []int)
Deprecated: Use EventEpochEnd.ProtoReflect.Descriptor instead.
func (*EventEpochEnd) GetEpochNumber ¶
func (x *EventEpochEnd) GetEpochNumber() int64
func (*EventEpochEnd) ProtoMessage ¶
func (*EventEpochEnd) ProtoMessage()
func (*EventEpochEnd) ProtoReflect ¶
func (x *EventEpochEnd) ProtoReflect() protoreflect.Message
func (*EventEpochEnd) Reset ¶
func (x *EventEpochEnd) Reset()
func (*EventEpochEnd) String ¶
func (x *EventEpochEnd) String() string
type EventEpochStart ¶
type EventEpochStart struct {
EpochNumber int64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
EpochStartTime int64 `protobuf:"varint,2,opt,name=epoch_start_time,json=epochStartTime,proto3" json:"epoch_start_time,omitempty"`
// contains filtered or unexported fields
}
EventEpochStart is an event emitted when an epoch start.
func (*EventEpochStart) Descriptor
deprecated
func (*EventEpochStart) Descriptor() ([]byte, []int)
Deprecated: Use EventEpochStart.ProtoReflect.Descriptor instead.
func (*EventEpochStart) GetEpochNumber ¶
func (x *EventEpochStart) GetEpochNumber() int64
func (*EventEpochStart) GetEpochStartTime ¶
func (x *EventEpochStart) GetEpochStartTime() int64
func (*EventEpochStart) ProtoMessage ¶
func (*EventEpochStart) ProtoMessage()
func (*EventEpochStart) ProtoReflect ¶
func (x *EventEpochStart) ProtoReflect() protoreflect.Message
func (*EventEpochStart) Reset ¶
func (x *EventEpochStart) Reset()
func (*EventEpochStart) String ¶
func (x *EventEpochStart) String() string
type GenesisState ¶
type GenesisState struct {
Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"`
// contains filtered or unexported fields
}
GenesisState defines the epochs module's genesis state.
func (*GenesisState) Descriptor
deprecated
func (*GenesisState) Descriptor() ([]byte, []int)
Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.
func (*GenesisState) GetEpochs ¶
func (x *GenesisState) GetEpochs() []*EpochInfo
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) ProtoReflect ¶
func (x *GenesisState) ProtoReflect() protoreflect.Message
func (*GenesisState) Reset ¶
func (x *GenesisState) Reset()
func (*GenesisState) String ¶
func (x *GenesisState) String() string
type QueryClient ¶
type QueryClient interface {
// EpochInfos provide running epochInfos
EpochInfos(ctx context.Context, in *QueryEpochInfosRequest, opts ...grpc.CallOption) (*QueryEpochInfosResponse, error)
// CurrentEpoch provide current epoch of specified identifier
CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error)
}
QueryClient is the client API for Query 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.
Query defines the gRPC querier service.
func NewQueryClient ¶
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient
type QueryCurrentEpochRequest ¶
type QueryCurrentEpochRequest struct {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// contains filtered or unexported fields
}
QueryCurrentEpochRequest defines the gRPC request structure for querying an epoch by its identifier.
func (*QueryCurrentEpochRequest) Descriptor
deprecated
func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryCurrentEpochRequest.ProtoReflect.Descriptor instead.
func (*QueryCurrentEpochRequest) GetIdentifier ¶
func (x *QueryCurrentEpochRequest) GetIdentifier() string
func (*QueryCurrentEpochRequest) ProtoMessage ¶
func (*QueryCurrentEpochRequest) ProtoMessage()
func (*QueryCurrentEpochRequest) ProtoReflect ¶
func (x *QueryCurrentEpochRequest) ProtoReflect() protoreflect.Message
func (*QueryCurrentEpochRequest) Reset ¶
func (x *QueryCurrentEpochRequest) Reset()
func (*QueryCurrentEpochRequest) String ¶
func (x *QueryCurrentEpochRequest) String() string
type QueryCurrentEpochResponse ¶
type QueryCurrentEpochResponse struct {
CurrentEpoch int64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
// contains filtered or unexported fields
}
QueryCurrentEpochResponse defines the gRPC response structure for querying an epoch by its identifier.
func (*QueryCurrentEpochResponse) Descriptor
deprecated
func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryCurrentEpochResponse.ProtoReflect.Descriptor instead.
func (*QueryCurrentEpochResponse) GetCurrentEpoch ¶
func (x *QueryCurrentEpochResponse) GetCurrentEpoch() int64
func (*QueryCurrentEpochResponse) ProtoMessage ¶
func (*QueryCurrentEpochResponse) ProtoMessage()
func (*QueryCurrentEpochResponse) ProtoReflect ¶
func (x *QueryCurrentEpochResponse) ProtoReflect() protoreflect.Message
func (*QueryCurrentEpochResponse) Reset ¶
func (x *QueryCurrentEpochResponse) Reset()
func (*QueryCurrentEpochResponse) String ¶
func (x *QueryCurrentEpochResponse) String() string
type QueryEpochInfosRequest ¶ added in v0.9.0
type QueryEpochInfosRequest struct {
// contains filtered or unexported fields
}
QueryEpochInfosRequest defines the gRPC request structure for querying all epoch info.
func (*QueryEpochInfosRequest) Descriptor
deprecated
added in
v0.9.0
func (*QueryEpochInfosRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryEpochInfosRequest.ProtoReflect.Descriptor instead.
func (*QueryEpochInfosRequest) ProtoMessage ¶ added in v0.9.0
func (*QueryEpochInfosRequest) ProtoMessage()
func (*QueryEpochInfosRequest) ProtoReflect ¶ added in v0.9.0
func (x *QueryEpochInfosRequest) ProtoReflect() protoreflect.Message
func (*QueryEpochInfosRequest) Reset ¶ added in v0.9.0
func (x *QueryEpochInfosRequest) Reset()
func (*QueryEpochInfosRequest) String ¶ added in v0.9.0
func (x *QueryEpochInfosRequest) String() string
type QueryEpochInfosResponse ¶ added in v0.9.0
type QueryEpochInfosResponse struct {
Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"`
// contains filtered or unexported fields
}
QueryEpochInfosRequest defines the gRPC response structure for querying all epoch info.
func (*QueryEpochInfosResponse) Descriptor
deprecated
added in
v0.9.0
func (*QueryEpochInfosResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryEpochInfosResponse.ProtoReflect.Descriptor instead.
func (*QueryEpochInfosResponse) GetEpochs ¶ added in v0.9.0
func (x *QueryEpochInfosResponse) GetEpochs() []*EpochInfo
func (*QueryEpochInfosResponse) ProtoMessage ¶ added in v0.9.0
func (*QueryEpochInfosResponse) ProtoMessage()
func (*QueryEpochInfosResponse) ProtoReflect ¶ added in v0.9.0
func (x *QueryEpochInfosResponse) ProtoReflect() protoreflect.Message
func (*QueryEpochInfosResponse) Reset ¶ added in v0.9.0
func (x *QueryEpochInfosResponse) Reset()
func (*QueryEpochInfosResponse) String ¶ added in v0.9.0
func (x *QueryEpochInfosResponse) String() string
type QueryServer ¶
type QueryServer interface {
// EpochInfos provide running epochInfos
EpochInfos(context.Context, *QueryEpochInfosRequest) (*QueryEpochInfosResponse, error)
// CurrentEpoch provide current epoch of specified identifier
CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error)
// contains filtered or unexported methods
}
QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility.
Query defines the gRPC querier service.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct{}
UnimplementedQueryServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedQueryServer) CurrentEpoch ¶
func (UnimplementedQueryServer) CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error)
func (UnimplementedQueryServer) EpochInfos ¶
func (UnimplementedQueryServer) EpochInfos(context.Context, *QueryEpochInfosRequest) (*QueryEpochInfosResponse, error)
type UnsafeQueryServer ¶
type UnsafeQueryServer interface {
// contains filtered or unexported methods
}
UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.