streaming

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// Annotation key used in Thrift IDL
	StreamingModeKey = "streaming.mode"

	// Streaming mode identifiers
	StreamingBidirectional = "bidirectional" // Bidirectional streaming API over HTTP2
	StreamingClientSide    = "client"        // Client-side streaming API over HTTP2
	StreamingServerSide    = "server"        // Server-side streaming API over HTTP2
	StreamingUnary         = "unary"         // Unary API over HTTP2, different from Kitex Thrift/Protobuf
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Streaming

type Streaming struct {
	Mode                   string `thrift:"Mode,1" json:"Mode"`
	ClientStreaming        bool   `thrift:"ClientStreaming,2" json:"ClientStreaming"`
	ServerStreaming        bool   `thrift:"ServerStreaming,3" json:"ServerStreaming"`
	BidirectionalStreaming bool   `thrift:"BidirectionalStreaming,4" json:"BidirectionalStreaming"`
	Unary                  bool   `thrift:"Unary,5" json:"Unary"`
	IsStreaming            bool   `thrift:"IsStreaming,6" json:"IsStreaming"`
}

Streaming represents the streaming mode of a function

func ParseStreaming

func ParseStreaming(f *parser.Function) (s *Streaming, err error)

ParseStreaming parses the streaming mode from a Thrift function parsed from IDL

Jump to

Keyboard shortcuts

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