util

package
v0.8.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Validate = validator.New()

Functions

This section is empty.

Types

type AsyncClient added in v0.8.2

type AsyncClient[T any] struct {
	Client T
	// contains filtered or unexported fields
}

func NewAsyncClient added in v0.8.2

func NewAsyncClient[T any]() *AsyncClient[T]

func (*AsyncClient[T]) BackgroundInitClient added in v0.8.2

func (c *AsyncClient[T]) BackgroundInitClient(setter func() T)

BackgroundInitClient will intialize the client only if it is curently unset. This can be called multiple times.

func (*AsyncClient[T]) IsSet added in v0.8.2

func (c *AsyncClient[T]) IsSet() bool

func (*AsyncClient[T]) SetClient added in v0.8.2

func (c *AsyncClient[T]) SetClient(client T)

SetClient will always update the client regardless of its previous confition.

func (*AsyncClient[T]) WaitForInit added in v0.8.2

func (c *AsyncClient[T]) WaitForInit()

type AsyncOpensearchClient

type AsyncOpensearchClient struct {
	*opensearch.Client
	// contains filtered or unexported fields
}

func NewAsyncOpensearchClient

func NewAsyncOpensearchClient() *AsyncOpensearchClient

func (*AsyncOpensearchClient) Lock

func (c *AsyncOpensearchClient) Lock()

func (*AsyncOpensearchClient) SetClient

func (c *AsyncOpensearchClient) SetClient(setter func() *opensearch.Client)

func (*AsyncOpensearchClient) Unlock

func (c *AsyncOpensearchClient) Unlock()

func (*AsyncOpensearchClient) UnsetClient

func (c *AsyncOpensearchClient) UnsetClient()

func (*AsyncOpensearchClient) WaitForInit

func (c *AsyncOpensearchClient) WaitForInit()

type OTELForwarder added in v0.8.2

type OTELForwarder struct {
	Client *AsyncClient[collogspb.LogsServiceClient]
	// contains filtered or unexported fields
}

func NewOTELForwarder added in v0.8.2

func NewOTELForwarder(opts ...OTELForwarderOption) *OTELForwarder

func (*OTELForwarder) BackgroundInitClient added in v0.8.2

func (f *OTELForwarder) BackgroundInitClient()

func (*OTELForwarder) Export added in v0.8.2

func (*OTELForwarder) SetClient added in v0.8.2

func (f *OTELForwarder) SetClient(cc grpc.ClientConnInterface)

type OTELForwarderOption added in v0.8.2

type OTELForwarderOption func(*otelForwarderOptions)

func WithAddress added in v0.8.2

func WithAddress(address string) OTELForwarderOption

func WithClientConn added in v0.8.2

func WithClientConn(cc grpc.ClientConnInterface) OTELForwarderOption

func WithDialOptions added in v0.8.2

func WithDialOptions(opts ...grpc.DialOption) OTELForwarderOption

func WithLogger added in v0.8.2

func WithLogger(lg *zap.SugaredLogger) OTELForwarderOption

Jump to

Keyboard shortcuts

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