kronospb

package
v0.0.0-...-d504ea7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 8 Imported by: 10

Documentation

Overview

Package kronospb is a generated protocol buffer package.

It is generated from these files:

kronos/pb/drift_service.proto
kronos/pb/kronos.proto

It has these top-level messages:

DriftTimeConfig
DriftTimeResponse
NodeAddr
OracleState
OracleProposal
Node
Cluster
OracleTimeRequest
OracleTimeResponse
KronosTimeRequest
KronosTimeResponse
StatusRequest
StatusResponse

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDriftService = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDriftService   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthKronos = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKronos   = fmt.Errorf("proto: integer overflow")
)
View Source
var ServerStatus_name = map[int32]string{
	0: "NOT_INITIALIZED",
	1: "INITIALIZED",
}
View Source
var ServerStatus_value = map[string]int32{
	"NOT_INITIALIZED": 0,
	"INITIALIZED":     1,
}

Functions

func RegisterTimeServiceServer

func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)

func RegisterUpdateDriftTimeServiceServer

func RegisterUpdateDriftTimeServiceServer(s *grpc.Server, srv UpdateDriftTimeServiceServer)

Types

type Cluster

type Cluster struct {
	// all_nodes is a map of NodeId -> Node metadata. This is the same id which is
	// used by raft.
	// This map contains both active nodes and nodes removed from the cluster.
	AllNodes             map[string]*Node `` /* 173-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Cluster stores the information about cluster that is persisted on each node.

func (*Cluster) Descriptor

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

func (*Cluster) Marshal

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

func (*Cluster) MarshalTo

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

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) Reset

func (m *Cluster) Reset()

func (*Cluster) Size

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

func (*Cluster) String

func (m *Cluster) String() string

func (*Cluster) Unmarshal

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

func (*Cluster) XXX_DiscardUnknown

func (m *Cluster) XXX_DiscardUnknown()

func (*Cluster) XXX_Marshal

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

func (*Cluster) XXX_Merge

func (dst *Cluster) XXX_Merge(src proto.Message)

func (*Cluster) XXX_Size

func (m *Cluster) XXX_Size() int

func (*Cluster) XXX_Unmarshal

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

type DriftTimeConfig

type DriftTimeConfig struct {
	// DriftFactor controls the rate of flow of drifting clock. eg. DriftFactor
	// of 1.1 means 1 second duration of system time will translate to 1.1
	// second with drifting clock.
	DriftFactor float64 `protobuf:"fixed64,1,opt,name=DriftFactor,proto3" json:"DriftFactor,omitempty"`
	// Offset is used to jump the clock by offset nanoseconds
	Offset int64 `protobuf:"varint,2,opt,name=Offset,proto3" json:"Offset,omitempty"`
}

func (*DriftTimeConfig) Descriptor

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

func (*DriftTimeConfig) Marshal

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

func (*DriftTimeConfig) MarshalTo

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

func (*DriftTimeConfig) ProtoMessage

func (*DriftTimeConfig) ProtoMessage()

func (*DriftTimeConfig) Reset

func (m *DriftTimeConfig) Reset()

func (*DriftTimeConfig) Size

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

func (*DriftTimeConfig) String

func (m *DriftTimeConfig) String() string

func (*DriftTimeConfig) Unmarshal

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

type DriftTimeResponse

type DriftTimeResponse struct {
}

func (*DriftTimeResponse) Descriptor

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

func (*DriftTimeResponse) Marshal

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

func (*DriftTimeResponse) MarshalTo

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

func (*DriftTimeResponse) ProtoMessage

func (*DriftTimeResponse) ProtoMessage()

func (*DriftTimeResponse) Reset

func (m *DriftTimeResponse) Reset()

func (*DriftTimeResponse) Size

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

func (*DriftTimeResponse) String

func (m *DriftTimeResponse) String() string

func (*DriftTimeResponse) Unmarshal

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

type KronosTimeRequest

type KronosTimeRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KronosTimeRequest) Descriptor

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

func (*KronosTimeRequest) Marshal

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

func (*KronosTimeRequest) MarshalTo

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

func (*KronosTimeRequest) ProtoMessage

func (*KronosTimeRequest) ProtoMessage()

func (*KronosTimeRequest) Reset

func (m *KronosTimeRequest) Reset()

func (*KronosTimeRequest) Size

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

func (*KronosTimeRequest) String

func (m *KronosTimeRequest) String() string

func (*KronosTimeRequest) Unmarshal

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

func (*KronosTimeRequest) XXX_DiscardUnknown

func (m *KronosTimeRequest) XXX_DiscardUnknown()

func (*KronosTimeRequest) XXX_Marshal

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

func (*KronosTimeRequest) XXX_Merge

func (dst *KronosTimeRequest) XXX_Merge(src proto.Message)

func (*KronosTimeRequest) XXX_Size

func (m *KronosTimeRequest) XXX_Size() int

func (*KronosTimeRequest) XXX_Unmarshal

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

type KronosTimeResponse

type KronosTimeResponse struct {
	// time is the KronosTime
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	// time_cap is an upper bound to KronosTime. This is periodically updated by
	// the oracle. If the oracle goes down and no new oracle is elected, or if
	// quorum is lost in the cluster, time_cap is used to as a safety measure so
	// that clusters stop serving time. Any time greater than time_cap may not be
	// reliable and not close to actual KronosTime.
	TimeCap int64 `protobuf:"varint,2,opt,name=time_cap,json=timeCap,proto3" json:"time_cap,omitempty"`
	// rtt is the round-trip time for the rpc. this is actually filled on the
	// client side.
	Rtt                  int64    `protobuf:"varint,3,opt,name=rtt,proto3" json:"rtt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KronosTimeResponse) Descriptor

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

func (*KronosTimeResponse) Marshal

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

func (*KronosTimeResponse) MarshalTo

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

func (*KronosTimeResponse) ProtoMessage

func (*KronosTimeResponse) ProtoMessage()

func (*KronosTimeResponse) Reset

func (m *KronosTimeResponse) Reset()

func (*KronosTimeResponse) Size

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

func (*KronosTimeResponse) String

func (m *KronosTimeResponse) String() string

func (*KronosTimeResponse) Unmarshal

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

func (*KronosTimeResponse) XXX_DiscardUnknown

func (m *KronosTimeResponse) XXX_DiscardUnknown()

func (*KronosTimeResponse) XXX_Marshal

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

func (*KronosTimeResponse) XXX_Merge

func (dst *KronosTimeResponse) XXX_Merge(src proto.Message)

func (*KronosTimeResponse) XXX_Size

func (m *KronosTimeResponse) XXX_Size() int

func (*KronosTimeResponse) XXX_Unmarshal

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

type KronosUptimeRequest

type KronosUptimeRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KronosUptimeRequest) Descriptor

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

func (*KronosUptimeRequest) Marshal

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

func (*KronosUptimeRequest) MarshalTo

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

func (*KronosUptimeRequest) ProtoMessage

func (*KronosUptimeRequest) ProtoMessage()

func (*KronosUptimeRequest) Reset

func (m *KronosUptimeRequest) Reset()

func (*KronosUptimeRequest) Size

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

func (*KronosUptimeRequest) String

func (m *KronosUptimeRequest) String() string

func (*KronosUptimeRequest) Unmarshal

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

func (*KronosUptimeRequest) XXX_DiscardUnknown

func (m *KronosUptimeRequest) XXX_DiscardUnknown()

func (*KronosUptimeRequest) XXX_Marshal

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

func (*KronosUptimeRequest) XXX_Merge

func (dst *KronosUptimeRequest) XXX_Merge(src proto.Message)

func (*KronosUptimeRequest) XXX_Size

func (m *KronosUptimeRequest) XXX_Size() int

func (*KronosUptimeRequest) XXX_Unmarshal

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

type KronosUptimeResponse

type KronosUptimeResponse struct {
	// time is the KronosUptime. This is the time for which the Kronos server has
	// been live.
	Uptime int64 `protobuf:"varint,1,opt,name=uptime,proto3" json:"uptime,omitempty"`
	// uptime_cap is an upper bound to KronosUptime. This is periodically updated by
	// the oracle. If the oracle goes down and no new oracle is elected, or if
	// quorum is lost in the cluster, uptime_cap is used to as a safety measure so
	// that clusters stop serving time. Any time greater than uptime_cap may not be
	// reliable and not close to actual KronosUptime.
	UptimeCap int64 `protobuf:"varint,2,opt,name=uptime_cap,json=uptimeCap,proto3" json:"uptime_cap,omitempty"`
	// rtt is the round-trip time for the rpc. this is actually filled on the
	// client side.
	Rtt                  int64    `protobuf:"varint,3,opt,name=rtt,proto3" json:"rtt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KronosUptimeResponse) Descriptor

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

func (*KronosUptimeResponse) Marshal

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

func (*KronosUptimeResponse) MarshalTo

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

func (*KronosUptimeResponse) ProtoMessage

func (*KronosUptimeResponse) ProtoMessage()

func (*KronosUptimeResponse) Reset

func (m *KronosUptimeResponse) Reset()

func (*KronosUptimeResponse) Size

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

func (*KronosUptimeResponse) String

func (m *KronosUptimeResponse) String() string

func (*KronosUptimeResponse) Unmarshal

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

func (*KronosUptimeResponse) XXX_DiscardUnknown

func (m *KronosUptimeResponse) XXX_DiscardUnknown()

func (*KronosUptimeResponse) XXX_Marshal

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

func (*KronosUptimeResponse) XXX_Merge

func (dst *KronosUptimeResponse) XXX_Merge(src proto.Message)

func (*KronosUptimeResponse) XXX_Size

func (m *KronosUptimeResponse) XXX_Size() int

func (*KronosUptimeResponse) XXX_Unmarshal

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

type Node

type Node struct {
	// raft_addr is the address of raft transport of the node.
	RaftAddr *NodeAddr `protobuf:"bytes,1,opt,name=raft_addr,json=raftAddr,proto3" json:"raft_addr,omitempty"`
	// is_removed is true for nodes which have been removed from the kronos raft
	// cluster. Removed node IDs cannot be added back to the cluster.
	IsRemoved            bool     `protobuf:"varint,2,opt,name=is_removed,json=isRemoved,proto3" json:"is_removed,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Node stores the data of a single node that is persisted in cluster info on each node.

func (*Node) Descriptor

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

func (*Node) Marshal

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

func (*Node) MarshalTo

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

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

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

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

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

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

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

func (*Node) XXX_Merge

func (dst *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

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

type NodeAddr

type NodeAddr struct {
	// Host of the node address
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Port of the node address
	Port                 string   `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NodeAddr) Descriptor

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

func (*NodeAddr) Marshal

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

func (*NodeAddr) MarshalTo

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

func (*NodeAddr) ProtoMessage

func (*NodeAddr) ProtoMessage()

func (*NodeAddr) Reset

func (m *NodeAddr) Reset()

func (*NodeAddr) Size

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

func (*NodeAddr) String

func (m *NodeAddr) String() string

func (*NodeAddr) Unmarshal

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

func (*NodeAddr) XXX_DiscardUnknown

func (m *NodeAddr) XXX_DiscardUnknown()

func (*NodeAddr) XXX_Marshal

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

func (*NodeAddr) XXX_Merge

func (dst *NodeAddr) XXX_Merge(src proto.Message)

func (*NodeAddr) XXX_Size

func (m *NodeAddr) XXX_Size() int

func (*NodeAddr) XXX_Unmarshal

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

type OracleProposal

type OracleProposal struct {
	// Proposal to update the oracle
	ProposedState        *OracleState `protobuf:"bytes,1,opt,name=proposed_state,json=proposedState,proto3" json:"proposed_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*OracleProposal) Descriptor

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

func (*OracleProposal) Marshal

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

func (*OracleProposal) MarshalTo

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

func (*OracleProposal) ProtoMessage

func (*OracleProposal) ProtoMessage()

func (*OracleProposal) Reset

func (m *OracleProposal) Reset()

func (*OracleProposal) Size

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

func (*OracleProposal) String

func (m *OracleProposal) String() string

func (*OracleProposal) Unmarshal

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

func (*OracleProposal) XXX_DiscardUnknown

func (m *OracleProposal) XXX_DiscardUnknown()

func (*OracleProposal) XXX_Marshal

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

func (*OracleProposal) XXX_Merge

func (dst *OracleProposal) XXX_Merge(src proto.Message)

func (*OracleProposal) XXX_Size

func (m *OracleProposal) XXX_Size() int

func (*OracleProposal) XXX_Unmarshal

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

type OracleState

type OracleState struct {
	// Current id. This is used for CAS operations
	// id is a sequence
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Upper bound to time generated by Kronos
	TimeCap int64 `protobuf:"varint,2,opt,name=time_cap,json=timeCap,proto3" json:"time_cap,omitempty"`
	// Address of current oracle
	Oracle *NodeAddr `protobuf:"bytes,3,opt,name=oracle,proto3" json:"oracle,omitempty"`
	// Upper bound to time generated by Kronos Uptime
	KronosUptimeCap      int64    `protobuf:"varint,4,opt,name=kronos_uptime_cap,json=kronosUptimeCap,proto3" json:"kronos_uptime_cap,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OracleState) Descriptor

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

func (*OracleState) Marshal

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

func (*OracleState) MarshalTo

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

func (*OracleState) ProtoMessage

func (*OracleState) ProtoMessage()

func (*OracleState) Reset

func (m *OracleState) Reset()

func (*OracleState) Size

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

func (*OracleState) String

func (m *OracleState) String() string

func (*OracleState) Unmarshal

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

func (*OracleState) XXX_DiscardUnknown

func (m *OracleState) XXX_DiscardUnknown()

func (*OracleState) XXX_Marshal

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

func (*OracleState) XXX_Merge

func (dst *OracleState) XXX_Merge(src proto.Message)

func (*OracleState) XXX_Size

func (m *OracleState) XXX_Size() int

func (*OracleState) XXX_Unmarshal

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

type OracleTimeRequest

type OracleTimeRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OracleTimeRequest) Descriptor

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

func (*OracleTimeRequest) Marshal

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

func (*OracleTimeRequest) MarshalTo

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

func (*OracleTimeRequest) ProtoMessage

func (*OracleTimeRequest) ProtoMessage()

func (*OracleTimeRequest) Reset

func (m *OracleTimeRequest) Reset()

func (*OracleTimeRequest) Size

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

func (*OracleTimeRequest) String

func (m *OracleTimeRequest) String() string

func (*OracleTimeRequest) Unmarshal

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

func (*OracleTimeRequest) XXX_DiscardUnknown

func (m *OracleTimeRequest) XXX_DiscardUnknown()

func (*OracleTimeRequest) XXX_Marshal

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

func (*OracleTimeRequest) XXX_Merge

func (dst *OracleTimeRequest) XXX_Merge(src proto.Message)

func (*OracleTimeRequest) XXX_Size

func (m *OracleTimeRequest) XXX_Size() int

func (*OracleTimeRequest) XXX_Unmarshal

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

type OracleTimeResponse

type OracleTimeResponse struct {
	// time is the KronosTime of the oracle.
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	// rtt is the round-trip time for the rpc. this is actually filled on the
	// client side.
	Rtt int64 `protobuf:"varint,2,opt,name=rtt,proto3" json:"rtt,omitempty"`
	// time is the KronosUptime of the oracle.
	Uptime               int64    `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OracleTimeResponse) Descriptor

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

func (*OracleTimeResponse) Marshal

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

func (*OracleTimeResponse) MarshalTo

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

func (*OracleTimeResponse) ProtoMessage

func (*OracleTimeResponse) ProtoMessage()

func (*OracleTimeResponse) Reset

func (m *OracleTimeResponse) Reset()

func (*OracleTimeResponse) Size

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

func (*OracleTimeResponse) String

func (m *OracleTimeResponse) String() string

func (*OracleTimeResponse) Unmarshal

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

func (*OracleTimeResponse) XXX_DiscardUnknown

func (m *OracleTimeResponse) XXX_DiscardUnknown()

func (*OracleTimeResponse) XXX_Marshal

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

func (*OracleTimeResponse) XXX_Merge

func (dst *OracleTimeResponse) XXX_Merge(src proto.Message)

func (*OracleTimeResponse) XXX_Size

func (m *OracleTimeResponse) XXX_Size() int

func (*OracleTimeResponse) XXX_Unmarshal

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

type ServerStatus

type ServerStatus int32
const (
	// Server is not the oracle and has not synced with the oracle
	// It cannot respond to KronosTime requests
	ServerStatus_NOT_INITIALIZED ServerStatus = 0
	// Server is the oracle or has synced with any oracle
	// It can respond to KronosTime requests if it is the current oracle.
	// KronosTime of initialized servers are valid
	ServerStatus_INITIALIZED ServerStatus = 1
)

func (ServerStatus) EnumDescriptor

func (ServerStatus) EnumDescriptor() ([]byte, []int)

func (ServerStatus) String

func (x ServerStatus) String() string

type StatusRequest

type StatusRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StatusRequest) Descriptor

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

func (*StatusRequest) Marshal

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

func (*StatusRequest) MarshalTo

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

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) Size

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

func (*StatusRequest) String

func (m *StatusRequest) String() string

func (*StatusRequest) Unmarshal

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

func (*StatusRequest) XXX_DiscardUnknown

func (m *StatusRequest) XXX_DiscardUnknown()

func (*StatusRequest) XXX_Marshal

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

func (*StatusRequest) XXX_Merge

func (dst *StatusRequest) XXX_Merge(src proto.Message)

func (*StatusRequest) XXX_Size

func (m *StatusRequest) XXX_Size() int

func (*StatusRequest) XXX_Unmarshal

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

type StatusResponse

type StatusResponse struct {
	ServerStatus         ServerStatus `protobuf:"varint,1,opt,name=server_status,json=serverStatus,proto3,enum=kronospb.ServerStatus" json:"server_status,omitempty"`
	OracleState          *OracleState `protobuf:"bytes,2,opt,name=oracle_state,json=oracleState,proto3" json:"oracle_state,omitempty"`
	Delta                int64        `protobuf:"varint,3,opt,name=delta,proto3" json:"delta,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*StatusResponse) Descriptor

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

func (*StatusResponse) Marshal

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

func (*StatusResponse) MarshalTo

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

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) Size

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

func (*StatusResponse) String

func (m *StatusResponse) String() string

func (*StatusResponse) Unmarshal

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

func (*StatusResponse) XXX_DiscardUnknown

func (m *StatusResponse) XXX_DiscardUnknown()

func (*StatusResponse) XXX_Marshal

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

func (*StatusResponse) XXX_Merge

func (dst *StatusResponse) XXX_Merge(src proto.Message)

func (*StatusResponse) XXX_Size

func (m *StatusResponse) XXX_Size() int

func (*StatusResponse) XXX_Unmarshal

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

type TimeServiceClient

type TimeServiceClient interface {
	// OracleTime returns the server's KronosTime if the server believes it is
	// the oracle, otherwise it returns an error.
	// A distributed state machine is used to store the identity of the oracle
	// and it is used by the server to know if it should respond to OracleTime
	// requests.
	// This RPC is used internally by kronos nodes to sync time with the elected
	// oracle.
	// This returns an error if
	// 1. The server is not the current oracle.
	// 2. The server is not initialized.
	// 3. The server's KronosTime is stale (KronosTime > Time Cap). This can
	//    mean that the cluster has lost a quorum of the nodes.
	OracleTime(ctx context.Context, in *OracleTimeRequest, opts ...grpc.CallOption) (*OracleTimeResponse, error)
	// KronosTime returns the server's KronosTime. An application can call this
	// RPC on the local kronos server to get access to KronosTime.
	// This does not validate whether the server is the oracle.
	// This returns an error if the server is not initialized or has
	// a stale KronosTime (KronosTime > Time Cap).
	KronosTime(ctx context.Context, in *KronosTimeRequest, opts ...grpc.CallOption) (*KronosTimeResponse, error)
	// KronosTime returns the server's KronosUptime. An application can call this
	// RPC on the local kronos server to get access to KronosUptime.
	// This does not validate whether the server is the oracle.
	// This returns an error if the server is not initialized or has
	// a stale KronosUptime (KronosUptime > Kronos Uptime Time Cap).
	KronosUptime(ctx context.Context, in *KronosUptimeRequest, opts ...grpc.CallOption) (*KronosUptimeResponse, error)
	// Status returns the status of the server.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

TimeServiceClient is the client API for TimeService service.

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

func NewTimeServiceClient

func NewTimeServiceClient(cc *grpc.ClientConn) TimeServiceClient

type TimeServiceServer

type TimeServiceServer interface {
	// OracleTime returns the server's KronosTime if the server believes it is
	// the oracle, otherwise it returns an error.
	// A distributed state machine is used to store the identity of the oracle
	// and it is used by the server to know if it should respond to OracleTime
	// requests.
	// This RPC is used internally by kronos nodes to sync time with the elected
	// oracle.
	// This returns an error if
	// 1. The server is not the current oracle.
	// 2. The server is not initialized.
	// 3. The server's KronosTime is stale (KronosTime > Time Cap). This can
	//    mean that the cluster has lost a quorum of the nodes.
	OracleTime(context.Context, *OracleTimeRequest) (*OracleTimeResponse, error)
	// KronosTime returns the server's KronosTime. An application can call this
	// RPC on the local kronos server to get access to KronosTime.
	// This does not validate whether the server is the oracle.
	// This returns an error if the server is not initialized or has
	// a stale KronosTime (KronosTime > Time Cap).
	KronosTime(context.Context, *KronosTimeRequest) (*KronosTimeResponse, error)
	// KronosTime returns the server's KronosUptime. An application can call this
	// RPC on the local kronos server to get access to KronosUptime.
	// This does not validate whether the server is the oracle.
	// This returns an error if the server is not initialized or has
	// a stale KronosUptime (KronosUptime > Kronos Uptime Time Cap).
	KronosUptime(context.Context, *KronosUptimeRequest) (*KronosUptimeResponse, error)
	// Status returns the status of the server.
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
}

TimeServiceServer is the server API for TimeService service.

type UpdateDriftTimeServiceClient

type UpdateDriftTimeServiceClient interface {
	UpdateDriftConfig(ctx context.Context, in *DriftTimeConfig, opts ...grpc.CallOption) (*DriftTimeResponse, error)
}

func NewUpdateDriftTimeServiceClient

func NewUpdateDriftTimeServiceClient(cc *grpc.ClientConn) UpdateDriftTimeServiceClient

type UpdateDriftTimeServiceServer

type UpdateDriftTimeServiceServer interface {
	UpdateDriftConfig(context.Context, *DriftTimeConfig) (*DriftTimeResponse, error)
}

Jump to

Keyboard shortcuts

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