Documentation
¶
Index ¶
- Constants
- Variables
- func NewConnection(in io.Writer, out io.Reader) net.Conn
- type DialArgs
- func (*DialArgs) Descriptor() ([]byte, []int)deprecated
- func (x *DialArgs) GetServiceName() string
- func (x *DialArgs) GetStreamType() DialArgs_StreamType
- func (*DialArgs) ProtoMessage()
- func (x *DialArgs) ProtoReflect() protoreflect.Message
- func (x *DialArgs) Reset()
- func (x *DialArgs) String() string
- type DialArgs_StreamType
- func (DialArgs_StreamType) Descriptor() protoreflect.EnumDescriptor
- func (x DialArgs_StreamType) Enum() *DialArgs_StreamType
- func (DialArgs_StreamType) EnumDescriptor() ([]byte, []int)deprecated
- func (x DialArgs_StreamType) Number() protoreflect.EnumNumber
- func (x DialArgs_StreamType) String() string
- func (DialArgs_StreamType) Type() protoreflect.EnumType
- type DialedStream
- type HelloArgs
- type NewSessionOpt
- type Session
- type StdinListener
- type Stream
- func (s *Stream) Close() error
- func (s *Stream) LocalAddr() net.Addr
- func (s *Stream) Read(p []byte) (int, error)
- func (s *Stream) RemoteAddr() net.Addr
- func (s *Stream) SetDeadline(t time.Time) error
- func (s *Stream) SetReadDeadline(t time.Time) error
- func (s *Stream) SetWriteDeadline(t time.Time) error
- func (s *Stream) Write(p []byte) (int, error)
Constants ¶
View Source
const ( NoCompression compressionKind = "compression.none" ZstdCompression compressionKind = "compression.zstd" )
Variables ¶
View Source
var ( DialArgs_StreamType_name = map[int32]string{ 0: "STREAM_TYPE_UNKNOWN", 1: "STREAM_TYPE_GRPC", } DialArgs_StreamType_value = map[string]int32{ "STREAM_TYPE_UNKNOWN": 0, "STREAM_TYPE_GRPC": 1, } )
Enum value maps for DialArgs_StreamType.
View Source
var ErrListenerClosed = errors.New("listener was closed")
View Source
var File_internal_grpcstdio_types_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type DialArgs ¶
type DialArgs struct { StreamType DialArgs_StreamType `` /* 147-byte string literal not displayed */ ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // contains filtered or unexported fields }
func (*DialArgs) Descriptor
deprecated
func (*DialArgs) GetServiceName ¶
func (*DialArgs) GetStreamType ¶
func (x *DialArgs) GetStreamType() DialArgs_StreamType
func (*DialArgs) ProtoMessage ¶
func (*DialArgs) ProtoMessage()
func (*DialArgs) ProtoReflect ¶
func (x *DialArgs) ProtoReflect() protoreflect.Message
type DialArgs_StreamType ¶
type DialArgs_StreamType int32
const ( DialArgs_STREAM_TYPE_UNKNOWN DialArgs_StreamType = 0 // Defaults to gRPC. DialArgs_STREAM_TYPE_GRPC DialArgs_StreamType = 1 )
func (DialArgs_StreamType) Descriptor ¶
func (DialArgs_StreamType) Descriptor() protoreflect.EnumDescriptor
func (DialArgs_StreamType) Enum ¶
func (x DialArgs_StreamType) Enum() *DialArgs_StreamType
func (DialArgs_StreamType) EnumDescriptor
deprecated
func (DialArgs_StreamType) EnumDescriptor() ([]byte, []int)
Deprecated: Use DialArgs_StreamType.Descriptor instead.
func (DialArgs_StreamType) Number ¶
func (x DialArgs_StreamType) Number() protoreflect.EnumNumber
func (DialArgs_StreamType) String ¶
func (x DialArgs_StreamType) String() string
func (DialArgs_StreamType) Type ¶
func (DialArgs_StreamType) Type() protoreflect.EnumType
type DialedStream ¶
type HelloArgs ¶
type HelloArgs struct { FnApiVersion int32 `protobuf:"varint,1,opt,name=fn_api_version,json=fnApiVersion,proto3" json:"fn_api_version,omitempty"` ToolApiVersion int32 `protobuf:"varint,2,opt,name=tool_api_version,json=toolApiVersion,proto3" json:"tool_api_version,omitempty"` // contains filtered or unexported fields }
func (*HelloArgs) Descriptor
deprecated
func (*HelloArgs) GetFnApiVersion ¶
func (*HelloArgs) GetToolApiVersion ¶
func (*HelloArgs) ProtoMessage ¶
func (*HelloArgs) ProtoMessage()
func (*HelloArgs) ProtoReflect ¶
func (x *HelloArgs) ProtoReflect() protoreflect.Message
type NewSessionOpt ¶
type NewSessionOpt func(*Session)
func WithCloseNotifier ¶
func WithCloseNotifier(f func(*Stream)) NewSessionOpt
func WithCompression ¶
func WithCompression(kind compressionKind) NewSessionOpt
func WithDebug ¶
func WithDebug(f func(string, ...interface{})) NewSessionOpt
func WithDefaults ¶
func WithDefaults() NewSessionOpt
func WithVersion ¶
func WithVersion(version int) NewSessionOpt
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) Accept ¶
func (s *Session) Accept() (*DialedStream, error)
type StdinListener ¶
type StdinListener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func NewListener(ctx context.Context) *StdinListener
func (*StdinListener) Addr ¶
func (lis *StdinListener) Addr() net.Addr
func (*StdinListener) Close ¶
func (lis *StdinListener) Close() error
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) RemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.