util

package
v0.0.0-...-2004213 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(client *etcd.Client, componentName config.ComponentName, version config.Version) (log.Logger, error)

func NewReidsClient

func NewReidsClient(c *config.ReidsConfig) (*redis.Client, error)

func NewTestLogger

func NewTestLogger() log.Logger

func SendHttpRequest

func SendHttpRequest(ctx context.Context, method string, url, bodyStr string, cookies []*http.Cookie, headers http.Header) (*http.Response, error)

Types

type EtcdWatcher

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

func NewEtcdWatcher

func NewEtcdWatcher(client *etcd.Client, watchKey TaskEtcdPrefix, logger log.Logger) *EtcdWatcher

func (*EtcdWatcher) WaitUntilWatchKeyChanged

func (e *EtcdWatcher) WaitUntilWatchKeyChanged(ctx context.Context, key string, baseRev int64) error

func (*EtcdWatcher) Watch

func (e *EtcdWatcher) Watch(handler func([]*etcd.Event) error, opts ...etcd.OpOption)

type TaskEtcdPrefix

type TaskEtcdPrefix string

Jump to

Keyboard shortcuts

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