contextutil

package
v0.0.0-...-34e0b2d Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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