pub struct Kollector {
    pub context: Context<InnerMessage>,
    pub max_depth: usize,
    pub pairs: Vec<String>,
    /* private fields */
}
Expand description

The Kollector is the main the main service

Fields

context: Context<InnerMessage>max_depth: usizepairs: Vec<String>

Implementations

Create a new Kollector service

Arguments
  • pairs - comma separated list of crypto pairs
  • max_depth - maximum depth of order book to stream

Spawn a gateway

This method add a new gateway to the gateway’s hashmap and start the websocket coroutine which connect to the exchange.

This method should be called before running the service.

Spawn the grpc server

This method should be called before running the service

Add web service

Add a web service for prometheus metrics and k8s liveness probe

Add Ctrl-C handler

Main coroutine

This coroutine runs the main part of the kollector service

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more