protoutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundedReceive

func BoundedReceive[Req any, ReqPtr Ptr[Req]](
	ctx context.Context,
	stream grpc.ServerStream,
	timeout time.Duration,
) (ReqPtr, error)

func MonitorStreamHealth

func MonitorStreamHealth[Req any, ReqPtr Ptr[Req]](
	ctx context.Context,
	log *zap.Logger,
	streamer grpc.ServerStream,
	validFn func(ReqPtr) bool,
) <-chan struct{}

func ProtoEqualError

func ProtoEqualError(a, b proto.Message) error

func SetEqualError

func SetEqualError[T proto.Message](a, b []T) error

func SliceClone

func SliceClone[T proto.Message](src []T) []T

func SliceEqualError

func SliceEqualError[T proto.Message](a, b []T) error

Types

type Ptr

type Ptr[T any] interface {
	proto.Message
	*T
}

Jump to

Keyboard shortcuts

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