public

package
v0.0.0-...-3071a76 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CandleChannel

type CandleChannel struct {
	Received chan *techan.Candle
	// contains filtered or unexported fields
}

func NewCandleChannel

func NewCandleChannel(bar, instID string) *CandleChannel

func (*CandleChannel) GetArg

func (c *CandleChannel) GetArg() map[string]string

func (*CandleChannel) ReceiveData

func (c *CandleChannel) ReceiveData(b []byte)

func (*CandleChannel) ToSeries

func (c *CandleChannel) ToSeries(data [][]string) (*techan.Candle, error)

type ChannelSub

type ChannelSub interface {
	GetArg() map[string]string
	ReceiveData([]byte)
}

type Client

type Client struct {
	*wsclient.Client
}

func NewPublicClient

func NewPublicClient(addr okapi.BaseURL) (*Client, error)

type PublicChannel

type PublicChannel[ReqType any, DataType any] struct {
	Req        ReqType
	ReceivedCh chan *DataType
	Channel    string
}

func (*PublicChannel[T, Ch]) GetArg

func (p *PublicChannel[T, Ch]) GetArg() map[string]string

func (*PublicChannel[T, Ch]) Init

func (p *PublicChannel[T, Ch]) Init(name string, req T)

func (*PublicChannel[T, Ch]) ReceiveData

func (p *PublicChannel[T, Ch]) ReceiveData(b []byte)

Jump to

Keyboard shortcuts

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