register

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(r *Register)

Option function to configure *Register

func WithData

func WithData(data interface{}) Option

WithData sets registerData

func WithKey

func WithKey(key string) Option

WithKey sets registerKey

func WithTTL

func WithTTL(ttl int64) Option

WithTTL sets ttl

type Register

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

Register Encapsulation of etcd register

func New

func New(opts ...Option) (r *Register)

New returns a new *Register

func (*Register) Run

func (r *Register) Run(ctx context.Context) (err error)

Run start register

func (*Register) Stopped added in v1.1.3

func (r *Register) Stopped() chan struct{}

Jump to

Keyboard shortcuts

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