worker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdRegistry

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

func NewEtcdRegistry

func NewEtcdRegistry(ops ...EtcdRegistryOp) *EtcdRegistry

func (*EtcdRegistry) Register

func (r *EtcdRegistry) Register(ctx context.Context, worker Worker, ttl int64) error

func (*EtcdRegistry) RegisterKey

func (r *EtcdRegistry) RegisterKey(ctx context.Context, key Key) error

type EtcdRegistryOp

type EtcdRegistryOp func(*EtcdRegistry)

func WithEtcdClient

func WithEtcdClient(cli *clientv3.Client) EtcdRegistryOp

type Key

type Key struct {
	Value     string
	Topic     string
	Partition string
}

type Worker

type Worker struct {
	HostId    string
	HostAddr  string
	Topic     string
	Partition string
}

Jump to

Keyboard shortcuts

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