nsqdserver

package
v0.3.7-HA.1.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FailedOnNotLeader   = consistence.ErrFailedOnNotLeader
	FailedOnNotWritable = consistence.ErrFailedOnNotWritable
)
View Source
const (
	TLSNotRequired = iota
	TLSRequiredExceptHTTP
	TLSRequired
)
View Source
const (
	E_INVALID         = "E_INVALID"
	E_TOPIC_NOT_EXIST = "E_TOPIC_NOT_EXIST"
)
View Source
const HTTP_EXT_HEADER_PREFIX = "X-Nsqext-"

Variables

View Source
var (
	ErrOrderChannelOnSampleRate = errors.New("order consume is not allowed while sample rate is not 0")
	ErrPubToWaitTimeout         = errors.New("pub to wait channel timeout")
)

Functions

func Send

func Send(client *nsqd.ClientV2, frameType int32, data []byte) error

func SendMessage

func SendMessage(client *nsqd.ClientV2, msg *nsqd.Message, writeExt bool, buf *bytes.Buffer, needFlush bool) error

func SendNow

func SendNow(client *nsqd.ClientV2, frameType int32, data []byte) error

Types

type ConsumeOffset

type ConsumeOffset struct {
	OffsetType  string
	OffsetValue int64
}

func (*ConsumeOffset) FromBytes

func (self *ConsumeOffset) FromBytes(s []byte) error

func (*ConsumeOffset) FromString

func (self *ConsumeOffset) FromString(s string) error

func (*ConsumeOffset) ToString

func (self *ConsumeOffset) ToString() string

type NsqdServer

type NsqdServer struct {
	// contains filtered or unexported fields
}

func NewNsqdServer

func NewNsqdServer(opts *nsqd.Options) (*nsqd.NSQD, *NsqdServer)

func (*NsqdServer) Exit

func (s *NsqdServer) Exit()

func (*NsqdServer) GetNsqdInstance

func (s *NsqdServer) GetNsqdInstance() *nsqd.NSQD

func (*NsqdServer) Main

func (s *NsqdServer) Main()

type Uint64Slice

type Uint64Slice []uint64

func (Uint64Slice) Len

func (s Uint64Slice) Len() int

func (Uint64Slice) Less

func (s Uint64Slice) Less(i, j int) bool

func (Uint64Slice) Swap

func (s Uint64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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