internalclient

package
v0.15.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

View Source
const (
	DeviceUIDHeader = "X-Device-UID"
)

Variables

View Source
var (
	ErrConnectionFailed = errors.New("connection failed")
	ErrNotFound         = errors.New("not found")
	ErrUnknown          = errors.New("unknown error")
)
View Source
var (
	ErrFirewallConnection = errors.New("failed to make the request to evaluate the firewall")
	ErrFirewallBlock      = errors.New("a firewall rule prohibit this connection")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	// contains filtered or unexported methods
}

func NewClient

func NewClient(opts ...Opt) Client

func NewClientWithAsynq added in v0.14.0

func NewClientWithAsynq(uri string) Client

NewClientWithAsynq creates a new API internal client with the Asynq client injected to turn the API internal client able to enqueue ping tasks to the Asynq server and late process by API server.

It uses the NewClient function to create a new API internal client and injects the Asynq client to it through the Options structure.

type LeveledLogger

type LeveledLogger struct {
	Logger *logrus.Logger
}

func (*LeveledLogger) Debugf added in v0.9.0

func (l *LeveledLogger) Debugf(msg string, keysAndValues ...interface{})

func (*LeveledLogger) Errorf added in v0.9.0

func (l *LeveledLogger) Errorf(msg string, keysAndValues ...interface{})

func (*LeveledLogger) Warnf added in v0.9.0

func (l *LeveledLogger) Warnf(msg string, keysAndValues ...interface{})

type Opt

type Opt func(*Options) error

type Options added in v0.12.5

type Options struct {
	Asynq *asynq.Client
}

Options wraps injectable values to a new API internal client. NOTE(r): This is a workaround to inject the Asynq client to the API internal client, because the [client] structure and its properties are privated.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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