Documentation ¶
Index ¶
- Variables
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type EpochInfo
- func (*EpochInfo) Descriptor() ([]byte, []int)
- func (m *EpochInfo) GetCurrentEpoch() int64
- func (m *EpochInfo) GetCurrentEpochStartHeight() int64
- func (m *EpochInfo) GetCurrentEpochStartTime() time.Time
- func (m *EpochInfo) GetDuration() time.Duration
- func (m *EpochInfo) GetEpochCountingStarted() bool
- func (m *EpochInfo) GetIdentifier() string
- func (m *EpochInfo) GetStartTime() time.Time
- func (m *EpochInfo) Marshal() (dAtA []byte, err error)
- func (m *EpochInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EpochInfo) ProtoMessage()
- func (m *EpochInfo) Reset()
- func (m *EpochInfo) Size() (n int)
- func (m *EpochInfo) String() string
- func (m *EpochInfo) Unmarshal(dAtA []byte) error
- func (m *EpochInfo) XXX_DiscardUnknown()
- func (m *EpochInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EpochInfo) XXX_Merge(src proto.Message)
- func (m *EpochInfo) XXX_Size() int
- func (m *EpochInfo) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryEpochsInfoRequest
- func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int)
- func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochsInfoRequest) ProtoMessage()
- func (m *QueryEpochsInfoRequest) Reset()
- func (m *QueryEpochsInfoRequest) Size() (n int)
- func (m *QueryEpochsInfoRequest) String() string
- func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown()
- func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message)
- func (m *QueryEpochsInfoRequest) XXX_Size() int
- func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error
- type QueryEpochsInfoResponse
- func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int)
- func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo
- func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochsInfoResponse) ProtoMessage()
- func (m *QueryEpochsInfoResponse) Reset()
- func (m *QueryEpochsInfoResponse) Size() (n int)
- func (m *QueryEpochsInfoResponse) String() string
- func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown()
- func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message)
- func (m *QueryEpochsInfoResponse) XXX_Size() int
- func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedQueryServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, 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 time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` // 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 time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` // 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 time.Time `` /* 158-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 */ }
func (*EpochInfo) Descriptor ¶
func (*EpochInfo) GetCurrentEpoch ¶
func (*EpochInfo) GetCurrentEpochStartHeight ¶
func (*EpochInfo) GetCurrentEpochStartTime ¶
func (*EpochInfo) GetDuration ¶
func (*EpochInfo) GetEpochCountingStarted ¶
func (*EpochInfo) GetIdentifier ¶
func (*EpochInfo) GetStartTime ¶
func (*EpochInfo) MarshalToSizedBuffer ¶
func (*EpochInfo) ProtoMessage ¶
func (*EpochInfo) ProtoMessage()
func (*EpochInfo) XXX_DiscardUnknown ¶
func (m *EpochInfo) XXX_DiscardUnknown()
func (*EpochInfo) XXX_Marshal ¶
func (*EpochInfo) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // EpochInfos provide running epochInfos EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, 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 QueryEpochsInfoRequest ¶
type QueryEpochsInfoRequest struct { }
func (*QueryEpochsInfoRequest) Descriptor ¶
func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int)
func (*QueryEpochsInfoRequest) Marshal ¶
func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error)
func (*QueryEpochsInfoRequest) MarshalTo ¶
func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochsInfoRequest) MarshalToSizedBuffer ¶
func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochsInfoRequest) ProtoMessage ¶
func (*QueryEpochsInfoRequest) ProtoMessage()
func (*QueryEpochsInfoRequest) Reset ¶
func (m *QueryEpochsInfoRequest) Reset()
func (*QueryEpochsInfoRequest) Size ¶
func (m *QueryEpochsInfoRequest) Size() (n int)
func (*QueryEpochsInfoRequest) String ¶
func (m *QueryEpochsInfoRequest) String() string
func (*QueryEpochsInfoRequest) Unmarshal ¶
func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error
func (*QueryEpochsInfoRequest) XXX_DiscardUnknown ¶
func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown()
func (*QueryEpochsInfoRequest) XXX_Marshal ¶
func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochsInfoRequest) XXX_Merge ¶
func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message)
func (*QueryEpochsInfoRequest) XXX_Size ¶
func (m *QueryEpochsInfoRequest) XXX_Size() int
func (*QueryEpochsInfoRequest) XXX_Unmarshal ¶
func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error
type QueryEpochsInfoResponse ¶
type QueryEpochsInfoResponse struct {
Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"`
}
func (*QueryEpochsInfoResponse) Descriptor ¶
func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int)
func (*QueryEpochsInfoResponse) GetEpochs ¶
func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo
func (*QueryEpochsInfoResponse) Marshal ¶
func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error)
func (*QueryEpochsInfoResponse) MarshalTo ¶
func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochsInfoResponse) MarshalToSizedBuffer ¶
func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochsInfoResponse) ProtoMessage ¶
func (*QueryEpochsInfoResponse) ProtoMessage()
func (*QueryEpochsInfoResponse) Reset ¶
func (m *QueryEpochsInfoResponse) Reset()
func (*QueryEpochsInfoResponse) Size ¶
func (m *QueryEpochsInfoResponse) Size() (n int)
func (*QueryEpochsInfoResponse) String ¶
func (m *QueryEpochsInfoResponse) String() string
func (*QueryEpochsInfoResponse) Unmarshal ¶
func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error
func (*QueryEpochsInfoResponse) XXX_DiscardUnknown ¶
func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown()
func (*QueryEpochsInfoResponse) XXX_Marshal ¶
func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochsInfoResponse) XXX_Merge ¶
func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message)
func (*QueryEpochsInfoResponse) XXX_Size ¶
func (m *QueryEpochsInfoResponse) XXX_Size() int
func (*QueryEpochsInfoResponse) XXX_Unmarshal ¶
func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // EpochInfos provide running epochInfos EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, 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) EpochInfos ¶
func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error)
Click to show internal directories.
Click to hide internal directories.