Documentation ¶
Index ¶
- Constants
- type Command
- type Master
- func (m *Master) AddResource(ctx context.Context, req *pb.ResourceSpec, resp *pb.NodeSpec) error
- func (m *Master) AddResources(rs []*ResourceSpec)
- func (m *Master) AddSeed()
- func (m *Master) Assign(_ *ResourceSpec) (*NodeSpec, error)
- func (m *Master) BecomeLeader() error
- func (m *Master) Campaign()
- func (m *Master) DelResource(ctx context.Context, spec *pb.ResourceSpec, _ *empty.Empty) error
- func (m *Master) IsLeader() bool
- func (m *Master) SetForwardCli(forwardCli crawler.CrawlerMasterService)
- func (m *Master) WatcherWorker() chan *registry.Result
- type Message
- type NodeSpec
- type Option
- type ResourceSpec
Constants ¶
View Source
const ( ResourcePath = "/resources" ResourceAdd = iota ResourceDel )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Master ¶
func (*Master) AddResource ¶
func (*Master) AddResources ¶
func (m *Master) AddResources(rs []*ResourceSpec)
func (*Master) BecomeLeader ¶
func (*Master) DelResource ¶
func (*Master) SetForwardCli ¶
func (m *Master) SetForwardCli(forwardCli crawler.CrawlerMasterService)
func (*Master) WatcherWorker ¶
type Message ¶
type Message struct { Cmd Command Specs []*ResourceSpec }
type Option ¶
type Option func(opts *options)
func WithGRPCAddr ¶
func WithLogger ¶
func WithRegistry ¶
func WithRegistryURL ¶
Click to show internal directories.
Click to hide internal directories.