worker

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 10 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) Publish added in v0.0.4

func (r *EtcdRegistry) Publish(ctx context.Context, message *subscribe.Message)

func (*EtcdRegistry) Register

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

type EtcdRegistryOp

type EtcdRegistryOp func(*EtcdRegistry)

func WithEtcdClient

func WithEtcdClient(cli *clientv3.Client) EtcdRegistryOp

func WithKeyTTL added in v1.4.0

func WithKeyTTL(ttl int64) EtcdRegistryOp

func WithWorkerTTL added in v1.4.0

func WithWorkerTTL(ttl int64) 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