Documentation ¶
Index ¶
- Constants
- Variables
- func AttachProfilingHandlers(router *mux.Router)
- type Base
- type BufConn
- func (t *BufConn) Close(addr string) error
- func (t *BufConn) CloseAll()
- func (t *BufConn) Dial(_ context.Context, addr string) (*rpc.ClientConn, error)
- func (t *BufConn) Listen(addr string) (net.Listener, error)
- func (t *BufConn) NewHTTPClient(addr string) (*http.Client, error)
- func (t *BufConn) Tranport(addr string) (*http.Transport, error)
- type ErrNotHealthy
- type GrpcConn
- type GrpcDialer
- type GrpcListener
- type HTTPClientBuilder
- type HTTPConn
- type HTTPListener
- type HTTPTranporter
- type HealthChecker
- type HealthStatus
- type Kind
- type ListenerFn
- type NetConn
- type Option
- type StatusType
Constants ¶
View Source
const ( StatusStopped = iota + 1 StatusStarted StatusStarting )
Variables ¶
View Source
var ( DefaultGrpcDialer = netConn DefaultGrpcListener = netConn DefaultHTTPListener = netConn DefaultHTTPClient = netConn )
View Source
var ( ErrOtelStack = errors.New("obs.New: error initializing otel stack") ErrEnvLoading = errors.New("env.Populate: error initializing otel stack") )
View Source
var ErrEmptyAddress = errors.New("address is empty")
Functions ¶
func AttachProfilingHandlers ¶ added in v0.5.0
Types ¶
type Base ¶ added in v0.5.0
type Base struct { Meta *meta.Data HnUpTime string Addr string OtelProvider *obs.OtelProvider Ctx context.Context // contains filtered or unexported fields }
Base provides common functionality for processes that run in background.
func (*Base) SetStartedNow ¶ added in v0.5.0
func (s *Base) SetStartedNow()
type BufConn ¶ added in v0.5.0
type BufConn struct {
// contains filtered or unexported fields
}
func NewBufConn ¶ added in v0.5.0
func NewBufConn() *BufConn
func NewBufConnWithTimeout ¶ added in v0.5.0
func (*BufConn) NewHTTPClient ¶ added in v0.5.0
type ErrNotHealthy ¶ added in v0.5.0
type ErrNotHealthy struct {
Addr string
}
func (ErrNotHealthy) Error ¶ added in v0.5.0
func (e ErrNotHealthy) Error() string
type GrpcConn ¶ added in v0.5.0
type GrpcConn struct { Dialer GrpcDialer Listener GrpcListener }
type GrpcDialer ¶ added in v0.5.0
type GrpcListener ¶ added in v0.5.0
type HTTPClientBuilder ¶ added in v0.5.0
type HTTPConn ¶ added in v0.5.0
type HTTPConn struct { ClientBuilder HTTPClientBuilder Listener HTTPListener }
func (HTTPConn) ClientBuilderOrDefault ¶ added in v0.5.0
func (s HTTPConn) ClientBuilderOrDefault() HTTPClientBuilder
func (HTTPConn) ListenerOrDefault ¶ added in v0.5.0
func (s HTTPConn) ListenerOrDefault() HTTPListener
type HTTPListener ¶ added in v0.5.0
type HTTPTranporter ¶ added in v0.5.0
type HealthChecker ¶ added in v0.5.0
type HealthStatus ¶ added in v0.6.0
type ListenerFn ¶ added in v0.5.0
type Option ¶ added in v0.5.0
type Option func(*Base)
func WithContext ¶ added in v0.5.0
func WithOtelProvider ¶ added in v0.5.0
func WithOtelProvider(p *obs.OtelProvider) Option
type StatusType ¶ added in v0.6.0
type StatusType int
func (StatusType) String ¶ added in v0.6.0
func (s StatusType) String() string
Click to show internal directories.
Click to hide internal directories.