utils

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package utils contains various helpers and utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendValueToArrowBuilder added in v0.7.0

func AppendValueToArrowBuilder[IN common.ValueType, OUT common.ValueType, AB common.ArrowBuilder[OUT]](
	acceptor any,
	builder array.Builder,
	conv conversion.ValuePtrConverter[IN, OUT],
) error

func AppendValueToArrowBuilderNullable added in v0.7.0

func AppendValueToArrowBuilderNullable[IN common.ValueType, OUT common.ValueType, AB common.ArrowBuilder[OUT]](
	acceptor any,
	builder array.Builder,
	conv conversion.ValuePtrConverter[IN, OUT],
) error

func LoggerMustFromContext added in v0.6.0

func LoggerMustFromContext(ctx context.Context) *zap.Logger

func MakeAppender added in v0.7.0

func MakeAppender[
	IN common.ValueType,
	OUT common.ValueType,
	AB common.ArrowBuilder[OUT],
](conv conversion.ValuePtrConverter[IN, OUT]) func(acceptor any, builder array.Builder) error

func MakeAppenderNullable added in v0.7.0

func MakeAppenderNullable[
	IN common.ValueType,
	OUT common.ValueType,
	AB common.ArrowBuilder[OUT],
](conv conversion.ValuePtrConverter[IN, OUT]) func(acceptor any, builder array.Builder) error

func StreamServerMetadata added in v0.6.0

func StreamServerMetadata(logger *zap.Logger) grpc.StreamServerInterceptor

func UnaryServerMetadata added in v0.6.0

func UnaryServerMetadata(logger *zap.Logger) grpc.UnaryServerInterceptor

Types

type Counter

type Counter[T number] struct {
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter[T number]() *Counter[T]

func (*Counter[T]) Add

func (c *Counter[T]) Add(delta T)

func (*Counter[T]) MakeChild

func (c *Counter[T]) MakeChild() *Counter[T]

func (*Counter[T]) Value

func (c *Counter[T]) Value() T

type Service added in v0.8.1

type Service interface {
	Start() error
	Stop()
}

Service is an abstract interface representing some internal service running in a distinct thread.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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