Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModeDefault = Mode("default") ModeOnlyParser = Mode("only-parser") ModeOnlySender = Mode("only-sender") )
Functions ¶
func RegisterServers ¶ added in v0.5.0
func RegisterServers(servers []string)
Types ¶
type BothWorker ¶ added in v0.3.0
type BothWorker struct { Client *Client SenderWorker *SenderWorker ParserWorker *ParserWorker // contains filtered or unexported fields }
func NewBothWorker ¶ added in v0.3.0
func NewBothWorker(client *Client, tag string, sender func(chan<- *api.Task), parser func(*api.Raw, *Client) error, options ...WorkerOptions) *BothWorker
func (*BothWorker) GetName ¶ added in v0.4.0
func (w *BothWorker) GetName() string
func (*BothWorker) Run ¶ added in v0.3.0
func (w *BothWorker) Run(ctx context.Context)
func (*BothWorker) SetConfig ¶ added in v0.5.3
func (w *BothWorker) SetConfig(cfg *WorkerConfig)
type Client ¶ added in v0.3.1
type Client struct {
api.GazerSystemClient
}
func NewClientWithLB ¶ added in v0.5.0
type GazerSystemResolver ¶ added in v0.5.0
type GazerSystemResolver struct {
// contains filtered or unexported fields
}
GazerSystemResolver Resolver(https://godoc.org/google.golang.org/grpc/resolver#Resolver).
func (*GazerSystemResolver) Close ¶ added in v0.5.0
func (*GazerSystemResolver) Close()
func (*GazerSystemResolver) ResolveNow ¶ added in v0.5.0
func (r *GazerSystemResolver) ResolveNow(_ resolver.ResolveNowOptions)
type GazerSystemResolverBuilder ¶ added in v0.5.0
type GazerSystemResolverBuilder struct {
// contains filtered or unexported fields
}
GazerSystemResolverBuilder ResolverBuilder(https://godoc.org/google.golang.org/grpc/resolver#Builder).
func (*GazerSystemResolverBuilder) Build ¶ added in v0.5.0
func (b *GazerSystemResolverBuilder) Build(target resolver.Target, cc resolver.ClientConn, _ resolver.BuildOptions) (resolver.Resolver, error)
func (*GazerSystemResolverBuilder) Scheme ¶ added in v0.5.0
func (*GazerSystemResolverBuilder) Scheme() string
type ParserUnit ¶ added in v0.2.0
type ParserWorker ¶ added in v0.2.0
type ParserWorker struct { Client *Client Tag string Parser func(*api.Raw, *Client) error // contains filtered or unexported fields }
func NewParserWorker ¶ added in v0.2.0
func NewParserWorker(gazerSystemClient *Client, tag string, parser func(*api.Raw, *Client) error, options ...WorkerOptions) *ParserWorker
func (*ParserWorker) GetName ¶ added in v0.4.0
func (p *ParserWorker) GetName() string
func (*ParserWorker) Run ¶ added in v0.2.0
func (p *ParserWorker) Run(ctx context.Context)
func (*ParserWorker) SetConfig ¶ added in v0.5.4
func (p *ParserWorker) SetConfig(cfg *WorkerConfig)
type SenderUnit ¶ added in v0.2.0
type SenderWorker ¶ added in v0.2.0
type SenderWorker struct { Client *Client TaskChannel chan *api.Task Sender func(chan<- *api.Task) // contains filtered or unexported fields }
func NewSenderWorker ¶ added in v0.2.0
func NewSenderWorker(client *Client, name string, sender func(chan<- *api.Task), options ...WorkerOptions) *SenderWorker
func (*SenderWorker) GetName ¶ added in v0.4.0
func (s *SenderWorker) GetName() string
func (*SenderWorker) Run ¶ added in v0.2.0
func (s *SenderWorker) Run(ctx context.Context)
func (*SenderWorker) SetConfig ¶ added in v0.5.4
func (s *SenderWorker) SetConfig(cfg *WorkerConfig)
type WorkUnit ¶ added in v0.2.0
type WorkUnit interface { Run(ctx context.Context) GetName() string SetConfig(cfg *WorkerConfig) }
type WorkerConfig ¶ added in v0.5.3
type WorkerGroup ¶ added in v0.2.0
type WorkerGroup struct { WorkerList []WorkUnit Server string Client *Client // contains filtered or unexported fields }
func NewWorkerGroup ¶ added in v0.2.0
func NewWorkerGroup(servers []string, options ...WorkerOptions) *WorkerGroup
func (*WorkerGroup) AddByWorkUnit ¶ added in v0.2.0
func (g *WorkerGroup) AddByWorkUnit(w WorkUnit)
func (*WorkerGroup) AddWorker ¶ added in v0.2.0
func (g *WorkerGroup) AddWorker(targetURL string, sender func(chan<- *api.Task), parser func(*api.Raw, *Client) error, options ...WorkerOptions)
func (*WorkerGroup) Run ¶ added in v0.2.0
func (g *WorkerGroup) Run(ctx context.Context)
type WorkerOptions ¶ added in v0.5.3
type WorkerOptions func(*WorkerConfig)
func WithDebug ¶ added in v0.5.3
func WithDebug(debug bool) WorkerOptions
func WithMode ¶ added in v0.6.0
func WithMode(mode Mode) WorkerOptions
func WithSpeedometerServer ¶ added in v0.5.3
func WithSpeedometerServer(server string) WorkerOptions
Click to show internal directories.
Click to hide internal directories.