abstractions

package
v0.0.0-...-f1afc9c Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRequest

func MakeRequest[T Requestable[T, S], S any](request S) (*T, error)

func MakeResponse

func MakeResponse[S any, T Responseable[S]](response T) (*S, error)

Types

type ConfigSubscriber

type ConfigSubscriber[T any] interface {
	SectionKey() string
	UpdateConfig(newCfg T) error
}

type ILogger

type ILogger interface {
	Close() error
}

type Keyer

type Keyer interface {
	Key() string
}

type RedisClient

type RedisClient interface {
	redis.UniversalClient
}

type Requestable

type Requestable[T, S any] interface {
	Request(S) (*T, error)
}

type Responseable

type Responseable[S any] interface {
	Response() (*S, error)
}

type Server

type Server interface {
	Start() error
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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