Documentation ¶
Index ¶
- func Encode(s *TaskSpec) string
- func GetNodeID(name string) (string, error)
- type AreaAssigner
- type Assigner
- type Master
- func (m *Master) AddTask(assigner Assigner, tasks ...*TaskSpec)
- func (m *Master) BecomeLeader() error
- func (m *Master) Campaign()
- func (m *Master) IsLeader() bool
- func (m *Master) PushTask(ctx context.Context, ptask *publisher.TaskSpec, out *empty.Empty) error
- func (m *Master) Run()
- func (m *Master) SetForwardCli(cli publisher.PublisherService)
- func (m *Master) WatchWorker() chan *registry.Result
- type Setup
- type SimpleAssigner
- type TaskSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AreaAssigner ¶
type AreaAssigner struct{}
type Master ¶
type Master struct { ID string Loc string IDGen *snowflake.Node // contains filtered or unexported fields }
func (*Master) BecomeLeader ¶
func (*Master) SetForwardCli ¶
func (m *Master) SetForwardCli(cli publisher.PublisherService)
func (*Master) WatchWorker ¶
type Setup ¶
type Setup func(opts *options)
func WithContext ¶
func WithGRPCAddress ¶
func WithLogger ¶
func WithRegistry ¶
func WithregistryURL ¶
type SimpleAssigner ¶
type SimpleAssigner struct{}
Click to show internal directories.
Click to hide internal directories.