Documentation
¶
Overview ¶
Package context provides internal context helpers for MCP sessions.
Index ¶
- Constants
- func GetKafkaSession(ctx context.Context) *kafka.Session
- func GetPulsarSession(ctx context.Context) *pulsar.Session
- func GetSNCloudCluster(ctx context.Context) string
- func GetSNCloudInstance(ctx context.Context) string
- func GetSNCloudOrganization(ctx context.Context) string
- func GetSNCloudSession(ctx context.Context) *config.Session
- func WithKafkaSession(ctx context.Context, session *kafka.Session) context.Context
- func WithPulsarSession(ctx context.Context, session *pulsar.Session) context.Context
- func WithSNCloudCluster(ctx context.Context, cluster string) context.Context
- func WithSNCloudInstance(ctx context.Context, instance string) context.Context
- func WithSNCloudOrganization(ctx context.Context, organization string) context.Context
- func WithSNCloudSession(ctx context.Context, session *config.Session) context.Context
Constants ¶
const ( SNCloudOrganizationContextKey contextKey = "sncloud_organization" SNCloudInstanceContextKey contextKey = "sncloud_instance" SNCloudClusterContextKey contextKey = "sncloud_cluster" SNCloudSessionContextKey contextKey = "sncloud_session" PulsarSessionContextKey contextKey = "pulsar_session" KafkaSessionContextKey contextKey = "kafka_session" )
Context keys for StreamNative sessions and identifiers.
Variables ¶
This section is empty.
Functions ¶
func GetKafkaSession ¶
GetKafkaSession gets the Kafka session from the context
func GetPulsarSession ¶
GetPulsarSession gets the Pulsar session from the context
func GetSNCloudCluster ¶
GetSNCloudCluster gets the SNCloud cluster from the context
func GetSNCloudInstance ¶
GetSNCloudInstance gets the SNCloud instance from the context
func GetSNCloudOrganization ¶
GetSNCloudOrganization gets the SNCloud organization from the context
func GetSNCloudSession ¶
GetSNCloudSession gets the SNCloud session from the context
func WithKafkaSession ¶
WithKafkaSession sets the Kafka session in the context
func WithPulsarSession ¶
WithPulsarSession sets the Pulsar session in the context
func WithSNCloudCluster ¶
WithSNCloudCluster sets the SNCloud cluster in the context
func WithSNCloudInstance ¶
WithSNCloudInstance sets the SNCloud instance in the context
func WithSNCloudOrganization ¶
WithSNCloudOrganization sets the SNCloud organization in the context
Types ¶
This section is empty.