Documentation ¶
Index ¶
- func RunServer(ctx context.Context, addr string)
- func StringListContains(ls []string, v string) bool
- type Acceptor
- type AcceptorCfg
- type Controllor
- type Dispatcher
- type DispatcherCfg
- type Journal
- func (j *Journal) CloseTag(tag string) error
- func (j *Journal) ConvertMsg2Buf(msg *libs.FluentMsg, data *map[string]interface{})
- func (j *Journal) DumpMsgFlow(ctx context.Context, msgPool *sync.Pool, ...) chan *libs.FluentMsg
- func (j *Journal) GetCommitChan() chan<- *libs.FluentMsg
- func (j *Journal) GetOutChan() chan *libs.FluentMsg
- func (j *Journal) LoadMaxID() (maxID int64, err error)
- func (j *Journal) ProcessLegacyMsg(dumpChan chan *libs.FluentMsg) (maxID int64, err2 error)
- type JournalCfg
- type Producer
- type ProducerCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringListContains ¶
Types ¶
type Acceptor ¶
type Acceptor struct { *AcceptorCfg // contains filtered or unexported fields }
Acceptor listening tcp connection, and decode messages
func NewAcceptor ¶
func NewAcceptor(cfg *AcceptorCfg, recvs ...recvs.AcceptorRecvItf) *Acceptor
NewAcceptor create new Acceptor
func (*Acceptor) GetAsyncOutChan ¶
GetAsyncOutChan return the message chan that received by blockable acceptor
func (*Acceptor) GetSyncOutChan ¶
GetSyncOutChan return the message chan that received by acceptor
type AcceptorCfg ¶
type AcceptorCfg struct { MsgPool *sync.Pool Journal *Journal AsyncOutChanSize, SyncOutChanSize int MaxRotateID int64 }
AcceptorCfg is the configuation of Acceptor
type Controllor ¶
type Controllor struct {
// contains filtered or unexported fields
}
Controllor is an IoC that manage all roles
type Dispatcher ¶
type Dispatcher struct { *DispatcherCfg // contains filtered or unexported fields }
Dispatcher dispatch messages by tag to different concator
func NewDispatcher ¶
func NewDispatcher(cfg *DispatcherCfg) *Dispatcher
NewDispatcher create new Dispatcher
func (*Dispatcher) GetOutChan ¶
func (d *Dispatcher) GetOutChan() chan *libs.FluentMsg
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run(ctx context.Context)
Run dispacher to dispatch messages to different concators
type DispatcherCfg ¶
type DispatcherCfg struct { InChan chan *libs.FluentMsg TagPipeline tagFilters.TagPipelineItf NFork, OutChanSize int }
type Journal ¶
type Journal struct { *JournalCfg // contains filtered or unexported fields }
Journal dumps all messages to files, then check every msg with committed id to make sure no msg lost
func NewJournal ¶
func NewJournal(ctx context.Context, cfg *JournalCfg) *Journal
NewJournal create new Journal with `bufDirPath` and `BufSizeBytes`
func (*Journal) ConvertMsg2Buf ¶
func (*Journal) DumpMsgFlow ¶
func (*Journal) GetCommitChan ¶
func (*Journal) GetOutChan ¶
type JournalCfg ¶
type Producer ¶
type Producer struct { *ProducerCfg sync.Mutex // contains filtered or unexported fields }
Producer send messages to downstream
func NewProducer ¶
func NewProducer(cfg *ProducerCfg, senders ...senders.SenderItf) (*Producer, error)
NewProducer create new producer
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package recvs defines different kind of receivers.
|
Package recvs defines different kind of receivers. |