epochsv1beta1

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

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

View Source
const (
	Query_EpochInfos_FullMethodName   = "/cosmos.epochs.v1beta1.Query/EpochInfos"
	Query_CurrentEpoch_FullMethodName = "/cosmos.epochs.v1beta1.Query/CurrentEpoch"
)

Variables

View Source
var File_cosmos_epochs_v1beta1_events_proto protoreflect.FileDescriptor
View Source
var File_cosmos_epochs_v1beta1_genesis_proto protoreflect.FileDescriptor
View Source
var File_cosmos_epochs_v1beta1_query_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use EpochInfo.ProtoReflect.Descriptor instead.

func (*EpochInfo) GetCurrentEpoch

func (x *EpochInfo) GetCurrentEpoch() int64

func (*EpochInfo) GetCurrentEpochStartHeight

func (x *EpochInfo) GetCurrentEpochStartHeight() int64

func (*EpochInfo) GetCurrentEpochStartTime

func (x *EpochInfo) GetCurrentEpochStartTime() *timestamppb.Timestamp

func (*EpochInfo) GetDuration

func (x *EpochInfo) GetDuration() *durationpb.Duration

func (*EpochInfo) GetEpochCountingStarted

func (x *EpochInfo) GetEpochCountingStarted() bool

func (*EpochInfo) GetIdentifier

func (x *EpochInfo) GetIdentifier() string

func (*EpochInfo) GetStartTime

func (x *EpochInfo) GetStartTime() *timestamppb.Timestamp

func (*EpochInfo) ProtoMessage

func (*EpochInfo) ProtoMessage()

func (*EpochInfo) ProtoReflect

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

func (*EpochInfo) Reset

func (x *EpochInfo) Reset()

func (*EpochInfo) String

func (x *EpochInfo) String() string

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 *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, 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
}

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
}

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 (*QueryCurrentEpochResponse) Reset

func (x *QueryCurrentEpochResponse) Reset()

func (*QueryCurrentEpochResponse) String

func (x *QueryCurrentEpochResponse) String() string

type QueryEpochsInfoRequest

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

func (*QueryEpochsInfoRequest) Descriptor deprecated

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

Deprecated: Use QueryEpochsInfoRequest.ProtoReflect.Descriptor instead.

func (*QueryEpochsInfoRequest) ProtoMessage

func (*QueryEpochsInfoRequest) ProtoMessage()

func (*QueryEpochsInfoRequest) ProtoReflect

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

func (*QueryEpochsInfoRequest) Reset

func (x *QueryEpochsInfoRequest) Reset()

func (*QueryEpochsInfoRequest) String

func (x *QueryEpochsInfoRequest) String() string

type QueryEpochsInfoResponse

type QueryEpochsInfoResponse struct {
	Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryEpochsInfoResponse) Descriptor deprecated

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

Deprecated: Use QueryEpochsInfoResponse.ProtoReflect.Descriptor instead.

func (*QueryEpochsInfoResponse) GetEpochs

func (x *QueryEpochsInfoResponse) GetEpochs() []*EpochInfo

func (*QueryEpochsInfoResponse) ProtoMessage

func (*QueryEpochsInfoResponse) ProtoMessage()

func (*QueryEpochsInfoResponse) ProtoReflect

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

func (*QueryEpochsInfoResponse) Reset

func (x *QueryEpochsInfoResponse) Reset()

func (*QueryEpochsInfoResponse) String

func (x *QueryEpochsInfoResponse) String() string

type QueryServer

type QueryServer interface {
	// EpochInfos provide running epochInfos
	EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, 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.

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.

Jump to

Keyboard shortcuts

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