Documentation
¶
Index ¶
- Constants
- Variables
- func GenShardSource(b []byte) uint
- func GenShardSource32(b []byte) uint32
- func IncrementBytes(b []byte) []byte
- func IsEntryNotFoundError(e error) bool
- func IsMessageNotSetError(err error) bool
- func IsMultipleEntryError(e error) bool
- func IsResourceUnavailableError(err error) bool
- type Client
- func (s *Client) DeleteMessages(topic string, uids [][]byte) error
- func (s *Client) Get(topic string, start []byte, wait bool) error
- func (s *Client) GetByPrefix(topic string, prefix []byte) error
- func (s *Client) GetByPrefixes(topic string, prefixes [][]byte) error
- func (s *Client) GetLarge(topic string, start []byte, wait bool, newest bool) error
- func (s *Client) GetLast() string
- func (s *Client) GetNext(topic string, start []byte, wait bool, newest bool) error
- func (s *Client) GetSingle(topic string, uid []byte) error
- func (s *Client) GetSingleContext(ctx context.Context, topic string, uid []byte) error
- func (s *Client) GetSpecific(topic string, uids [][]byte) error
- func (s *Client) GetTopicCount(topic string, prefix []byte) (uint64, error)
- func (s *Client) GetTopicList() error
- func (s *Client) GetWOpts(opts Opts) error
- func (s *Client) Listen(ctx context.Context, topic string, prefixes [][]byte) (chan *Message, error)
- func (s *Client) ListenOpts(opts Opts) (chan *Message, error)
- func (s *Client) Save(messages []*Message, timestamp time.Time) error
- func (s *Client) SaveSingle(message *Message, timestamp time.Time) error
- func (s *Client) SetConn() error
- type ConnHandler
- type HostConn
- type Message
- type Opts
- type Topic
Constants ¶
View Source
const ( DefaultGetTimeout = 60 * time.Second DefaultSetTimeout = 10 * time.Minute DefaultWaitTimeout = 5 * time.Minute DefaultStreamTimeout = 7 * 24 * time.Hour )
View Source
const ( DefaultLimit = db_util.DefaultLimit MediumLimit = db_util.MediumLimit LargeLimit = db_util.LargeLimit ExLargeLimit = db_util.ExLargeLimit HugeLimit = db_util.HugeLimit )
View Source
const ( MessageNotSetErrorMessage = "error message not set" MultipleEntryErrorMessage = "error multiple entries found" EntryNotFoundErrorMessage = "error entry not found" )
View Source
const (
MaxMessageSize = 32 * 10e7
)
Variables ¶
View Source
var ( MultipleEntryError = fmt.Errorf(MultipleEntryErrorMessage) EntryNotFoundError = fmt.Errorf(EntryNotFoundErrorMessage) MessageNotSetError = fmt.Errorf(MessageNotSetErrorMessage) )
Functions ¶
func GenShardSource ¶
func GenShardSource32 ¶
func IncrementBytes ¶
func IsEntryNotFoundError ¶
func IsMessageNotSetError ¶
func IsMultipleEntryError ¶
Types ¶
type Client ¶
func (*Client) GetByPrefixes ¶
func (*Client) GetSingleContext ¶
func (*Client) GetTopicCount ¶
func (*Client) GetTopicList ¶
func (*Client) SaveSingle ¶
type ConnHandler ¶
type ConnHandler struct { NewConn chan HostConn Connections map[string]*grpc.ClientConn }
func (*ConnHandler) Add ¶
func (h *ConnHandler) Add(host string, conn *grpc.ClientConn)
func (*ConnHandler) Get ¶
func (h *ConnHandler) Get(host string) *grpc.ClientConn
func (*ConnHandler) Start ¶
func (h *ConnHandler) Start()
type HostConn ¶
type HostConn struct { Host string Conn *grpc.ClientConn }
type Message ¶
func (Message) MessageHex ¶
Click to show internal directories.
Click to hide internal directories.