Documentation
¶
Overview ¶
Package orderbook is a generated protocol buffer package.
It is generated from these files:
github.com/crypto-bank/proto/orderbook/orderbook.proto github.com/crypto-bank/proto/orderbook/event.proto
It has these top-level messages:
ReadRequest Event BatchEvents
Index ¶
- Variables
- func RegisterOrderBookServer(s *grpc.Server, srv OrderBookServer)
- type BatchEvents
- func (*BatchEvents) Descriptor() ([]byte, []int)
- func (this *BatchEvents) Equal(that interface{}) bool
- func (m *BatchEvents) GetEvents() []*Event
- func (m *BatchEvents) Marshal() (dAtA []byte, err error)
- func (m *BatchEvents) MarshalTo(dAtA []byte) (int, error)
- func (*BatchEvents) ProtoMessage()
- func (m *BatchEvents) Reset()
- func (m *BatchEvents) Size() (n int)
- func (m *BatchEvents) String() string
- func (m *BatchEvents) Unmarshal(dAtA []byte) error
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (this *Event) Equal(that interface{}) bool
- func (m *Event) GetEvent() isEvent_Event
- func (m *Event) GetID() int64
- func (m *Event) GetOrder() *order.Order
- func (m *Event) GetTrade() *order.Trade
- func (event *Event) Inner() interface{}
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (m *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- func (*Event) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Event_Order
- type Event_Trade
- type OrderBookClient
- type OrderBookServer
- type OrderBook_ReadClient
- type OrderBook_ReadServer
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)
- func (this *ReadRequest) Equal(that interface{}) bool
- func (m *ReadRequest) GetEnd() *google_protobuf1.Timestamp
- func (m *ReadRequest) GetExchange() exchange.Exchange
- func (m *ReadRequest) GetMaxBatchSize() int64
- func (m *ReadRequest) GetPair() *currency.Pair
- func (m *ReadRequest) GetStart() *google_protobuf1.Timestamp
- func (m *ReadRequest) Marshal() (dAtA []byte, err error)
- func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ReadRequest) ProtoMessage()
- func (m *ReadRequest) Reset()
- func (m *ReadRequest) Size() (n int)
- func (m *ReadRequest) String() string
- func (m *ReadRequest) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") )
View Source
var ( ErrInvalidLengthOrderbook = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOrderbook = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterOrderBookServer ¶
func RegisterOrderBookServer(s *grpc.Server, srv OrderBookServer)
Types ¶
type BatchEvents ¶
type BatchEvents struct { // Events - Batch of events. Events []*Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` }
BatchEvents - Batch of events.
func (*BatchEvents) Descriptor ¶
func (*BatchEvents) Descriptor() ([]byte, []int)
func (*BatchEvents) Equal ¶
func (this *BatchEvents) Equal(that interface{}) bool
func (*BatchEvents) GetEvents ¶
func (m *BatchEvents) GetEvents() []*Event
func (*BatchEvents) Marshal ¶
func (m *BatchEvents) Marshal() (dAtA []byte, err error)
func (*BatchEvents) ProtoMessage ¶
func (*BatchEvents) ProtoMessage()
func (*BatchEvents) Reset ¶
func (m *BatchEvents) Reset()
func (*BatchEvents) Size ¶
func (m *BatchEvents) Size() (n int)
func (*BatchEvents) String ¶
func (m *BatchEvents) String() string
func (*BatchEvents) Unmarshal ¶
func (m *BatchEvents) Unmarshal(dAtA []byte) error
type Event ¶
type Event struct { // Id - Identifier of this event. // It can be for example `seq` number as in `Poloniex`. ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Event - Inner event, it can be order update or a trade. // // Types that are valid to be assigned to Event: // *Event_Order // *Event_Trade Event isEvent_Event `protobuf_oneof:"event"` }
Event - Order or Trade event.
func (*Event) Descriptor ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
type Event_Order ¶
func (*Event_Order) Equal ¶
func (this *Event_Order) Equal(that interface{}) bool
func (*Event_Order) Size ¶
func (m *Event_Order) Size() (n int)
type Event_Trade ¶
func (*Event_Trade) Equal ¶
func (this *Event_Trade) Equal(that interface{}) bool
func (*Event_Trade) Size ¶
func (m *Event_Trade) Size() (n int)
type OrderBookClient ¶
type OrderBookClient interface { // Read - Starts streaming real-time updates of an order book, // and all trades happening in real-time. // Batches are sent in `MaxBatchSize` when reading from history, // or in received size in real-time when live streaming. Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (OrderBook_ReadClient, error) }
func NewOrderBookClient ¶
func NewOrderBookClient(cc *grpc.ClientConn) OrderBookClient
type OrderBookServer ¶
type OrderBookServer interface { // Read - Starts streaming real-time updates of an order book, // and all trades happening in real-time. // Batches are sent in `MaxBatchSize` when reading from history, // or in received size in real-time when live streaming. Read(*ReadRequest, OrderBook_ReadServer) error }
type OrderBook_ReadClient ¶
type OrderBook_ReadClient interface { Recv() (*BatchEvents, error) grpc.ClientStream }
type OrderBook_ReadServer ¶
type OrderBook_ReadServer interface { Send(*BatchEvents) error grpc.ServerStream }
type ReadRequest ¶
type ReadRequest struct { // Pair - Currency pair. Pair *currency.Pair `protobuf:"bytes,1,opt,name=pair" json:"pair,omitempty"` // Exchange - Identifier of an exchange. Exchange exchange.Exchange `protobuf:"varint,2,opt,name=exchange,proto3,enum=exchange.Exchange" json:"exchange,omitempty"` // Start - Time of a first order to read. // If it is zero it will start reading from first record. Start *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=start" json:"start,omitempty"` // End - Time of a last order to read. // `Zero` will indicate we want to read until the end, // in case of historical data it will be last existing trade, // in case of real-time data it will stream updates forever. End *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=end" json:"end,omitempty"` // MaxBatchSize - Maximum size of a single batch sent. MaxBatchSize int64 `protobuf:"varint,5,opt,name=max_batch_size,proto3" json:"max_batch_size,omitempty"` }
ReadRequest - Order book read request. It can be a real-time or historical data request.
func (*ReadRequest) Descriptor ¶
func (*ReadRequest) Descriptor() ([]byte, []int)
func (*ReadRequest) Equal ¶
func (this *ReadRequest) Equal(that interface{}) bool
func (*ReadRequest) GetEnd ¶
func (m *ReadRequest) GetEnd() *google_protobuf1.Timestamp
func (*ReadRequest) GetExchange ¶
func (m *ReadRequest) GetExchange() exchange.Exchange
func (*ReadRequest) GetMaxBatchSize ¶
func (m *ReadRequest) GetMaxBatchSize() int64
func (*ReadRequest) GetPair ¶
func (m *ReadRequest) GetPair() *currency.Pair
func (*ReadRequest) GetStart ¶
func (m *ReadRequest) GetStart() *google_protobuf1.Timestamp
func (*ReadRequest) Marshal ¶
func (m *ReadRequest) Marshal() (dAtA []byte, err error)
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) Reset ¶
func (m *ReadRequest) Reset()
func (*ReadRequest) Size ¶
func (m *ReadRequest) Size() (n int)
func (*ReadRequest) String ¶
func (m *ReadRequest) String() string
func (*ReadRequest) Unmarshal ¶
func (m *ReadRequest) Unmarshal(dAtA []byte) error
Click to show internal directories.
Click to hide internal directories.