odin

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_odin_odin_proto protoreflect.FileDescriptor
View Source
var Odin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "odin.Odin",
	HandlerType: (*OdinServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Span",
			Handler:    _Odin_Span_Handler,
		},
		{
			MethodName: "FetchCheckpoint",
			Handler:    _Odin_FetchCheckpoint_Handler,
		},
		{
			MethodName: "FetchCheckpointCount",
			Handler:    _Odin_FetchCheckpointCount_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StateSyncEvents",
			Handler:       _Odin_StateSyncEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "odin/odin.proto",
}

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

Functions

func RegisterOdinServer

func RegisterOdinServer(s grpc.ServiceRegistrar, srv OdinServer)

Types

type Checkpoint

type Checkpoint struct {
	Proposer   *H160                  `protobuf:"bytes,1,opt,name=Proposer,proto3" json:"Proposer,omitempty"`
	StartBlock uint64                 `protobuf:"varint,2,opt,name=StartBlock,proto3" json:"StartBlock,omitempty"`
	EndBlock   uint64                 `protobuf:"varint,3,opt,name=EndBlock,proto3" json:"EndBlock,omitempty"`
	RootHash   *H256                  `protobuf:"bytes,4,opt,name=RootHash,proto3" json:"RootHash,omitempty"`
	BorChainID string                 `protobuf:"bytes,5,opt,name=BorChainID,proto3" json:"BorChainID,omitempty"`
	Timestamp  *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Checkpoint) Descriptor deprecated

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

Deprecated: Use Checkpoint.ProtoReflect.Descriptor instead.

func (*Checkpoint) GetBorChainID

func (x *Checkpoint) GetBorChainID() string

func (*Checkpoint) GetEndBlock

func (x *Checkpoint) GetEndBlock() uint64

func (*Checkpoint) GetProposer

func (x *Checkpoint) GetProposer() *H160

func (*Checkpoint) GetRootHash

func (x *Checkpoint) GetRootHash() *H256

func (*Checkpoint) GetStartBlock

func (x *Checkpoint) GetStartBlock() uint64

func (*Checkpoint) GetTimestamp

func (x *Checkpoint) GetTimestamp() *timestamppb.Timestamp

func (*Checkpoint) ProtoMessage

func (*Checkpoint) ProtoMessage()

func (*Checkpoint) ProtoReflect

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

func (*Checkpoint) Reset

func (x *Checkpoint) Reset()

func (*Checkpoint) String

func (x *Checkpoint) String() string

type CheckpointCount

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

func (*CheckpointCount) Descriptor deprecated

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

Deprecated: Use CheckpointCount.ProtoReflect.Descriptor instead.

func (*CheckpointCount) GetResult

func (x *CheckpointCount) GetResult() int64

func (*CheckpointCount) ProtoMessage

func (*CheckpointCount) ProtoMessage()

func (*CheckpointCount) ProtoReflect

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

func (*CheckpointCount) Reset

func (x *CheckpointCount) Reset()

func (*CheckpointCount) String

func (x *CheckpointCount) String() string

type EventRecord

type EventRecord struct {
	ID       uint64                 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Contract string                 `protobuf:"bytes,2,opt,name=Contract,proto3" json:"Contract,omitempty"`
	Data     string                 `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	TxHash   string                 `protobuf:"bytes,4,opt,name=TxHash,proto3" json:"TxHash,omitempty"`
	LogIndex uint64                 `protobuf:"varint,5,opt,name=LogIndex,proto3" json:"LogIndex,omitempty"`
	ChainID  string                 `protobuf:"bytes,6,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	Time     *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=Time,proto3" json:"Time,omitempty"`
	// contains filtered or unexported fields
}

func (*EventRecord) Descriptor deprecated

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

Deprecated: Use EventRecord.ProtoReflect.Descriptor instead.

func (*EventRecord) GetChainID

func (x *EventRecord) GetChainID() string

func (*EventRecord) GetContract

func (x *EventRecord) GetContract() string

func (*EventRecord) GetData

func (x *EventRecord) GetData() string

func (*EventRecord) GetID

func (x *EventRecord) GetID() uint64

func (*EventRecord) GetLogIndex

func (x *EventRecord) GetLogIndex() uint64

func (*EventRecord) GetTime

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

func (*EventRecord) GetTxHash

func (x *EventRecord) GetTxHash() string

func (*EventRecord) ProtoMessage

func (*EventRecord) ProtoMessage()

func (*EventRecord) ProtoReflect

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

func (*EventRecord) Reset

func (x *EventRecord) Reset()

func (*EventRecord) String

func (x *EventRecord) String() string

type FetchCheckpointCountResponse

type FetchCheckpointCountResponse struct {
	Height string           `protobuf:"bytes,1,opt,name=Height,proto3" json:"Height,omitempty"`
	Result *CheckpointCount `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchCheckpointCountResponse) Descriptor deprecated

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

Deprecated: Use FetchCheckpointCountResponse.ProtoReflect.Descriptor instead.

func (*FetchCheckpointCountResponse) GetHeight

func (x *FetchCheckpointCountResponse) GetHeight() string

func (*FetchCheckpointCountResponse) GetResult

func (*FetchCheckpointCountResponse) ProtoMessage

func (*FetchCheckpointCountResponse) ProtoMessage()

func (*FetchCheckpointCountResponse) ProtoReflect

func (*FetchCheckpointCountResponse) Reset

func (x *FetchCheckpointCountResponse) Reset()

func (*FetchCheckpointCountResponse) String

type FetchCheckpointRequest

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

func (*FetchCheckpointRequest) Descriptor deprecated

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

Deprecated: Use FetchCheckpointRequest.ProtoReflect.Descriptor instead.

func (*FetchCheckpointRequest) GetID

func (x *FetchCheckpointRequest) GetID() int64

func (*FetchCheckpointRequest) ProtoMessage

func (*FetchCheckpointRequest) ProtoMessage()

func (*FetchCheckpointRequest) ProtoReflect

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

func (*FetchCheckpointRequest) Reset

func (x *FetchCheckpointRequest) Reset()

func (*FetchCheckpointRequest) String

func (x *FetchCheckpointRequest) String() string

type FetchCheckpointResponse

type FetchCheckpointResponse struct {
	Height string      `protobuf:"bytes,1,opt,name=Height,proto3" json:"Height,omitempty"`
	Result *Checkpoint `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchCheckpointResponse) Descriptor deprecated

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

Deprecated: Use FetchCheckpointResponse.ProtoReflect.Descriptor instead.

func (*FetchCheckpointResponse) GetHeight

func (x *FetchCheckpointResponse) GetHeight() string

func (*FetchCheckpointResponse) GetResult

func (x *FetchCheckpointResponse) GetResult() *Checkpoint

func (*FetchCheckpointResponse) ProtoMessage

func (*FetchCheckpointResponse) ProtoMessage()

func (*FetchCheckpointResponse) ProtoReflect

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

func (*FetchCheckpointResponse) Reset

func (x *FetchCheckpointResponse) Reset()

func (*FetchCheckpointResponse) String

func (x *FetchCheckpointResponse) String() string

type H128

type H128 struct {
	Hi uint64 `protobuf:"varint,1,opt,name=Hi,proto3" json:"Hi,omitempty"`
	Lo uint64 `protobuf:"varint,2,opt,name=Lo,proto3" json:"Lo,omitempty"`
	// contains filtered or unexported fields
}

func (*H128) Descriptor deprecated

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

Deprecated: Use H128.ProtoReflect.Descriptor instead.

func (*H128) GetHi

func (x *H128) GetHi() uint64

func (*H128) GetLo

func (x *H128) GetLo() uint64

func (*H128) ProtoMessage

func (*H128) ProtoMessage()

func (*H128) ProtoReflect

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

func (*H128) Reset

func (x *H128) Reset()

func (*H128) String

func (x *H128) String() string

type H160

type H160 struct {
	Hi *H128  `protobuf:"bytes,1,opt,name=Hi,proto3" json:"Hi,omitempty"`
	Lo uint32 `protobuf:"varint,2,opt,name=Lo,proto3" json:"Lo,omitempty"`
	// contains filtered or unexported fields
}

func (*H160) Descriptor deprecated

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

Deprecated: Use H160.ProtoReflect.Descriptor instead.

func (*H160) GetHi

func (x *H160) GetHi() *H128

func (*H160) GetLo

func (x *H160) GetLo() uint32

func (*H160) ProtoMessage

func (*H160) ProtoMessage()

func (*H160) ProtoReflect

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

func (*H160) Reset

func (x *H160) Reset()

func (*H160) String

func (x *H160) String() string

type H256

type H256 struct {
	Hi *H128 `protobuf:"bytes,1,opt,name=Hi,proto3" json:"Hi,omitempty"`
	Lo *H128 `protobuf:"bytes,2,opt,name=Lo,proto3" json:"Lo,omitempty"`
	// contains filtered or unexported fields
}

func (*H256) Descriptor deprecated

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

Deprecated: Use H256.ProtoReflect.Descriptor instead.

func (*H256) GetHi

func (x *H256) GetHi() *H128

func (*H256) GetLo

func (x *H256) GetLo() *H128

func (*H256) ProtoMessage

func (*H256) ProtoMessage()

func (*H256) ProtoReflect

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

func (*H256) Reset

func (x *H256) Reset()

func (*H256) String

func (x *H256) String() string

type OdinClient

type OdinClient interface {
	Span(ctx context.Context, in *SpanRequest, opts ...grpc.CallOption) (*SpanResponse, error)
	StateSyncEvents(ctx context.Context, in *StateSyncEventsRequest, opts ...grpc.CallOption) (Odin_StateSyncEventsClient, error)
	FetchCheckpoint(ctx context.Context, in *FetchCheckpointRequest, opts ...grpc.CallOption) (*FetchCheckpointResponse, error)
	FetchCheckpointCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FetchCheckpointCountResponse, error)
}

OdinClient is the client API for Odin 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.

func NewOdinClient

func NewOdinClient(cc grpc.ClientConnInterface) OdinClient

type OdinServer

type OdinServer interface {
	Span(context.Context, *SpanRequest) (*SpanResponse, error)
	StateSyncEvents(*StateSyncEventsRequest, Odin_StateSyncEventsServer) error
	FetchCheckpoint(context.Context, *FetchCheckpointRequest) (*FetchCheckpointResponse, error)
	FetchCheckpointCount(context.Context, *emptypb.Empty) (*FetchCheckpointCountResponse, error)
	// contains filtered or unexported methods
}

OdinServer is the server API for Odin service. All implementations must embed UnimplementedOdinServer for forward compatibility

type Odin_StateSyncEventsClient

type Odin_StateSyncEventsClient interface {
	Recv() (*StateSyncEventsResponse, error)
	grpc.ClientStream
}

type Odin_StateSyncEventsServer

type Odin_StateSyncEventsServer interface {
	Send(*StateSyncEventsResponse) error
	grpc.ServerStream
}

type Span

type Span struct {
	ID                uint64        `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	StartBlock        uint64        `protobuf:"varint,2,opt,name=StartBlock,proto3" json:"StartBlock,omitempty"`
	EndBlock          uint64        `protobuf:"varint,3,opt,name=EndBlock,proto3" json:"EndBlock,omitempty"`
	ValidatorSet      *ValidatorSet `protobuf:"bytes,4,opt,name=ValidatorSet,proto3" json:"ValidatorSet,omitempty"`
	SelectedProducers []*Validator  `protobuf:"bytes,5,rep,name=SelectedProducers,proto3" json:"SelectedProducers,omitempty"`
	ChainID           string        `protobuf:"bytes,6,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	// contains filtered or unexported fields
}

func (*Span) Descriptor deprecated

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

Deprecated: Use Span.ProtoReflect.Descriptor instead.

func (*Span) GetChainID

func (x *Span) GetChainID() string

func (*Span) GetEndBlock

func (x *Span) GetEndBlock() uint64

func (*Span) GetID

func (x *Span) GetID() uint64

func (*Span) GetSelectedProducers

func (x *Span) GetSelectedProducers() []*Validator

func (*Span) GetStartBlock

func (x *Span) GetStartBlock() uint64

func (*Span) GetValidatorSet

func (x *Span) GetValidatorSet() *ValidatorSet

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) ProtoReflect

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

func (*Span) Reset

func (x *Span) Reset()

func (*Span) String

func (x *Span) String() string

type SpanRequest

type SpanRequest struct {
	ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*SpanRequest) Descriptor deprecated

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

Deprecated: Use SpanRequest.ProtoReflect.Descriptor instead.

func (*SpanRequest) GetID

func (x *SpanRequest) GetID() uint64

func (*SpanRequest) ProtoMessage

func (*SpanRequest) ProtoMessage()

func (*SpanRequest) ProtoReflect

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

func (*SpanRequest) Reset

func (x *SpanRequest) Reset()

func (*SpanRequest) String

func (x *SpanRequest) String() string

type SpanResponse

type SpanResponse struct {
	Height string `protobuf:"bytes,1,opt,name=Height,proto3" json:"Height,omitempty"`
	Result *Span  `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
	// contains filtered or unexported fields
}

func (*SpanResponse) Descriptor deprecated

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

Deprecated: Use SpanResponse.ProtoReflect.Descriptor instead.

func (*SpanResponse) GetHeight

func (x *SpanResponse) GetHeight() string

func (*SpanResponse) GetResult

func (x *SpanResponse) GetResult() *Span

func (*SpanResponse) ProtoMessage

func (*SpanResponse) ProtoMessage()

func (*SpanResponse) ProtoReflect

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

func (*SpanResponse) Reset

func (x *SpanResponse) Reset()

func (*SpanResponse) String

func (x *SpanResponse) String() string

type StateSyncEventsRequest

type StateSyncEventsRequest struct {
	FromID uint64 `protobuf:"varint,1,opt,name=FromID,proto3" json:"FromID,omitempty"`
	ToTime uint64 `protobuf:"varint,2,opt,name=ToTime,proto3" json:"ToTime,omitempty"`
	Limit  uint64 `protobuf:"varint,3,opt,name=Limit,proto3" json:"Limit,omitempty"`
	// contains filtered or unexported fields
}

func (*StateSyncEventsRequest) Descriptor deprecated

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

Deprecated: Use StateSyncEventsRequest.ProtoReflect.Descriptor instead.

func (*StateSyncEventsRequest) GetFromID

func (x *StateSyncEventsRequest) GetFromID() uint64

func (*StateSyncEventsRequest) GetLimit

func (x *StateSyncEventsRequest) GetLimit() uint64

func (*StateSyncEventsRequest) GetToTime

func (x *StateSyncEventsRequest) GetToTime() uint64

func (*StateSyncEventsRequest) ProtoMessage

func (*StateSyncEventsRequest) ProtoMessage()

func (*StateSyncEventsRequest) ProtoReflect

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

func (*StateSyncEventsRequest) Reset

func (x *StateSyncEventsRequest) Reset()

func (*StateSyncEventsRequest) String

func (x *StateSyncEventsRequest) String() string

type StateSyncEventsResponse

type StateSyncEventsResponse struct {
	Height string         `protobuf:"bytes,1,opt,name=Height,proto3" json:"Height,omitempty"`
	Result []*EventRecord `protobuf:"bytes,2,rep,name=Result,proto3" json:"Result,omitempty"`
	// contains filtered or unexported fields
}

func (*StateSyncEventsResponse) Descriptor deprecated

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

Deprecated: Use StateSyncEventsResponse.ProtoReflect.Descriptor instead.

func (*StateSyncEventsResponse) GetHeight

func (x *StateSyncEventsResponse) GetHeight() string

func (*StateSyncEventsResponse) GetResult

func (x *StateSyncEventsResponse) GetResult() []*EventRecord

func (*StateSyncEventsResponse) ProtoMessage

func (*StateSyncEventsResponse) ProtoMessage()

func (*StateSyncEventsResponse) ProtoReflect

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

func (*StateSyncEventsResponse) Reset

func (x *StateSyncEventsResponse) Reset()

func (*StateSyncEventsResponse) String

func (x *StateSyncEventsResponse) String() string

type UnimplementedOdinServer

type UnimplementedOdinServer struct {
}

UnimplementedOdinServer must be embedded to have forward compatible implementations.

func (UnimplementedOdinServer) FetchCheckpoint

func (UnimplementedOdinServer) FetchCheckpointCount

func (UnimplementedOdinServer) Span

func (UnimplementedOdinServer) StateSyncEvents

type UnsafeOdinServer

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

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

type Validator

type Validator struct {
	ID               uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Address          *H160  `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	VotingPower      int64  `protobuf:"varint,3,opt,name=VotingPower,proto3" json:"VotingPower,omitempty"`
	ProposerPriority int64  `protobuf:"varint,4,opt,name=ProposerPriority,proto3" json:"ProposerPriority,omitempty"`
	// contains filtered or unexported fields
}

func (*Validator) Descriptor deprecated

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

Deprecated: Use Validator.ProtoReflect.Descriptor instead.

func (*Validator) GetAddress

func (x *Validator) GetAddress() *H160

func (*Validator) GetID

func (x *Validator) GetID() uint64

func (*Validator) GetProposerPriority

func (x *Validator) GetProposerPriority() int64

func (*Validator) GetVotingPower

func (x *Validator) GetVotingPower() int64

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) ProtoReflect

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

func (*Validator) Reset

func (x *Validator) Reset()

func (*Validator) String

func (x *Validator) String() string

type ValidatorSet

type ValidatorSet struct {
	Validators []*Validator `protobuf:"bytes,1,rep,name=Validators,proto3" json:"Validators,omitempty"`
	Proposer   *Validator   `protobuf:"bytes,2,opt,name=Proposer,proto3" json:"Proposer,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidatorSet) Descriptor deprecated

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

Deprecated: Use ValidatorSet.ProtoReflect.Descriptor instead.

func (*ValidatorSet) GetProposer

func (x *ValidatorSet) GetProposer() *Validator

func (*ValidatorSet) GetValidators

func (x *ValidatorSet) GetValidators() []*Validator

func (*ValidatorSet) ProtoMessage

func (*ValidatorSet) ProtoMessage()

func (*ValidatorSet) ProtoReflect

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

func (*ValidatorSet) Reset

func (x *ValidatorSet) Reset()

func (*ValidatorSet) String

func (x *ValidatorSet) String() string

Jump to

Keyboard shortcuts

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