contextutil

package
v0.10.3-0...-cc07be3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterID

func GetClusterID(ctx context.Context) (string, error)

GetClusterID gets cluster id from context.

func GetCreateConsumer

func GetCreateConsumer(ctx context.Context) (*streamingpb.CreateConsumerRequest, error)

GetCreateConsumer gets create consumer request from context.

func GetCreateProducer

func GetCreateProducer(ctx context.Context) (*streamingpb.CreateProducerRequest, error)

GetCreateProducer gets create producer request from context.

func GetPickServerID

func GetPickServerID(ctx context.Context) (int64, bool)

GetPickServerID must get the pick result from context. panic otherwise.

func WithClusterID

func WithClusterID(ctx context.Context, clusterID string) context.Context

WithClusterID attaches cluster id to context.

func WithCreateConsumer

func WithCreateConsumer(ctx context.Context, req *streamingpb.CreateConsumerRequest) context.Context

WithCreateConsumer attaches create consumer request to context.

func WithCreateProducer

func WithCreateProducer(ctx context.Context, req *streamingpb.CreateProducerRequest) context.Context

WithCreateProducer attaches create producer request to context.

func WithPickServerID

func WithPickServerID(ctx context.Context, serverID int64) context.Context

WithPickServerID returns a new context with the pick result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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