Documentation ¶
Index ¶
- Constants
- Variables
- func AddMaxConnectionAgeContext(ctx, ageCtx context.Context) context.Context
- func HandleIOError(msg string, err error) error
- func HostWithPort(u *url.URL) string
- func IsStatusError(err error) bool
- func MaxConnectionAge2GRPCKeepalive(auxCtx context.Context, maxConnectionAge time.Duration) (grpc.ServerOption, stats.Handler)
- func MaxConnectionAgeContextFromStreamContext(streamCtx context.Context) context.Context
- func MetaToValuesMap(meta metadata.MD) map[string]*prototool.Values
- func NewHeaderMetadata(header http.Header, insecure bool) credentials.PerRPCCredentials
- func NewLazyStreamVisitor(streamMessage proto.Message) func() *StreamVisitor
- func NewServerMaxConnAgeStatsHandler(auxCtx context.Context, maxConnectionAge time.Duration) stats.Handler
- func NewTokenCredentials(token api.AgentToken, insecure bool) credentials.PerRPCCredentials
- func RequestCanceled(err error) bool
- func RequestCanceledOrTimedOut(err error) bool
- func RequestTimedOut(err error) bool
- func SplitGRPCMethod(fullMethodName string) (string, string)
- func StartServer(stage stager.Stage, server *grpc.Server, listener func() (net.Listener, error), ...)
- func StatusErrorFromContext(ctx context.Context, msg string) error
- func StreamClientLimitingInterceptor(limiter ClientLimiter) grpc.StreamClientInterceptor
- func StreamClientValidatingInterceptor(parentCtx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, ...) (grpc.ClientStream, error)
- func StreamServerErrorReporterInterceptor(errorReporter ServerErrorReporter) grpc.StreamServerInterceptor
- func StreamServerLimitingInterceptor(limiter ServerLimiter) grpc.StreamServerInterceptor
- func UnaryClientLimitingInterceptor(limiter ClientLimiter) grpc.UnaryClientInterceptor
- func UnaryClientValidatingInterceptor(parentCtx context.Context, method string, req, reply interface{}, ...) error
- func UnaryServerErrorReporterInterceptor(errorReporter ServerErrorReporter) grpc.UnaryServerInterceptor
- func UnaryServerLimitingInterceptor(limiter ServerLimiter) grpc.UnaryServerInterceptor
- func ValuesMapToMeta(vals map[string]*prototool.Values) metadata.MD
- type CheckHeader
- type ClientLimiter
- type DialListener
- type DoResponse
- type EOFCallback
- type ErrResp
- type HTTPDo
- type HTTPRequestClient
- type HandleIOErrorFunc
- type HandleProcessingErrorFunc
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetData() *HttpRequest_Data
- func (x *HttpRequest) GetHeader() *HttpRequest_Header
- func (m *HttpRequest) GetMessage() isHttpRequest_Message
- func (x *HttpRequest) GetTrailer() *HttpRequest_Trailer
- func (x *HttpRequest) GetUpgradeData() *HttpRequest_UpgradeData
- func (*HttpRequest) ProtoMessage()
- func (x *HttpRequest) ProtoReflect() protoreflect.Message
- func (x *HttpRequest) Reset()
- func (x *HttpRequest) String() string
- func (m *HttpRequest) Validate() error
- func (m *HttpRequest) ValidateAll() error
- type HttpRequestMultiError
- type HttpRequestValidationError
- func (e HttpRequestValidationError) Cause() error
- func (e HttpRequestValidationError) Error() string
- func (e HttpRequestValidationError) ErrorName() string
- func (e HttpRequestValidationError) Field() string
- func (e HttpRequestValidationError) Key() bool
- func (e HttpRequestValidationError) Reason() string
- type HttpRequest_Data
- func (*HttpRequest_Data) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest_Data) GetData() []byte
- func (*HttpRequest_Data) ProtoMessage()
- func (x *HttpRequest_Data) ProtoReflect() protoreflect.Message
- func (x *HttpRequest_Data) Reset()
- func (x *HttpRequest_Data) String() string
- func (m *HttpRequest_Data) Validate() error
- func (m *HttpRequest_Data) ValidateAll() error
- type HttpRequest_DataMultiError
- type HttpRequest_DataValidationError
- func (e HttpRequest_DataValidationError) Cause() error
- func (e HttpRequest_DataValidationError) Error() string
- func (e HttpRequest_DataValidationError) ErrorName() string
- func (e HttpRequest_DataValidationError) Field() string
- func (e HttpRequest_DataValidationError) Key() bool
- func (e HttpRequest_DataValidationError) Reason() string
- type HttpRequest_Data_
- type HttpRequest_Header
- func (*HttpRequest_Header) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest_Header) GetContentLength() int64
- func (x *HttpRequest_Header) GetExtra() *anypb.Any
- func (x *HttpRequest_Header) GetRequest() *prototool.HttpRequest
- func (x *HttpRequest_Header) IsRequestWithoutBody() bool
- func (*HttpRequest_Header) ProtoMessage()
- func (x *HttpRequest_Header) ProtoReflect() protoreflect.Message
- func (x *HttpRequest_Header) Reset()
- func (x *HttpRequest_Header) String() string
- func (m *HttpRequest_Header) Validate() error
- func (m *HttpRequest_Header) ValidateAll() error
- type HttpRequest_HeaderMultiError
- type HttpRequest_HeaderValidationError
- func (e HttpRequest_HeaderValidationError) Cause() error
- func (e HttpRequest_HeaderValidationError) Error() string
- func (e HttpRequest_HeaderValidationError) ErrorName() string
- func (e HttpRequest_HeaderValidationError) Field() string
- func (e HttpRequest_HeaderValidationError) Key() bool
- func (e HttpRequest_HeaderValidationError) Reason() string
- type HttpRequest_Header_
- type HttpRequest_Trailer
- func (*HttpRequest_Trailer) Descriptor() ([]byte, []int)deprecated
- func (*HttpRequest_Trailer) ProtoMessage()
- func (x *HttpRequest_Trailer) ProtoReflect() protoreflect.Message
- func (x *HttpRequest_Trailer) Reset()
- func (x *HttpRequest_Trailer) String() string
- func (m *HttpRequest_Trailer) Validate() error
- func (m *HttpRequest_Trailer) ValidateAll() error
- type HttpRequest_TrailerMultiError
- type HttpRequest_TrailerValidationError
- func (e HttpRequest_TrailerValidationError) Cause() error
- func (e HttpRequest_TrailerValidationError) Error() string
- func (e HttpRequest_TrailerValidationError) ErrorName() string
- func (e HttpRequest_TrailerValidationError) Field() string
- func (e HttpRequest_TrailerValidationError) Key() bool
- func (e HttpRequest_TrailerValidationError) Reason() string
- type HttpRequest_Trailer_
- type HttpRequest_UpgradeData
- func (*HttpRequest_UpgradeData) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest_UpgradeData) GetData() []byte
- func (*HttpRequest_UpgradeData) ProtoMessage()
- func (x *HttpRequest_UpgradeData) ProtoReflect() protoreflect.Message
- func (x *HttpRequest_UpgradeData) Reset()
- func (x *HttpRequest_UpgradeData) String() string
- func (m *HttpRequest_UpgradeData) Validate() error
- func (m *HttpRequest_UpgradeData) ValidateAll() error
- type HttpRequest_UpgradeDataMultiError
- type HttpRequest_UpgradeDataValidationError
- func (e HttpRequest_UpgradeDataValidationError) Cause() error
- func (e HttpRequest_UpgradeDataValidationError) Error() string
- func (e HttpRequest_UpgradeDataValidationError) ErrorName() string
- func (e HttpRequest_UpgradeDataValidationError) Field() string
- func (e HttpRequest_UpgradeDataValidationError) Key() bool
- func (e HttpRequest_UpgradeDataValidationError) Reason() string
- type HttpRequest_UpgradeData_
- type HttpResponse
- func (*HttpResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse) GetData() *HttpResponse_Data
- func (x *HttpResponse) GetHeader() *HttpResponse_Header
- func (m *HttpResponse) GetMessage() isHttpResponse_Message
- func (x *HttpResponse) GetTrailer() *HttpResponse_Trailer
- func (x *HttpResponse) GetUpgradeData() *HttpResponse_UpgradeData
- func (*HttpResponse) ProtoMessage()
- func (x *HttpResponse) ProtoReflect() protoreflect.Message
- func (x *HttpResponse) Reset()
- func (x *HttpResponse) String() string
- func (m *HttpResponse) Validate() error
- func (m *HttpResponse) ValidateAll() error
- type HttpResponseMultiError
- type HttpResponseValidationError
- func (e HttpResponseValidationError) Cause() error
- func (e HttpResponseValidationError) Error() string
- func (e HttpResponseValidationError) ErrorName() string
- func (e HttpResponseValidationError) Field() string
- func (e HttpResponseValidationError) Key() bool
- func (e HttpResponseValidationError) Reason() string
- type HttpResponse_Data
- func (*HttpResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse_Data) GetData() []byte
- func (*HttpResponse_Data) ProtoMessage()
- func (x *HttpResponse_Data) ProtoReflect() protoreflect.Message
- func (x *HttpResponse_Data) Reset()
- func (x *HttpResponse_Data) String() string
- func (m *HttpResponse_Data) Validate() error
- func (m *HttpResponse_Data) ValidateAll() error
- type HttpResponse_DataMultiError
- type HttpResponse_DataValidationError
- func (e HttpResponse_DataValidationError) Cause() error
- func (e HttpResponse_DataValidationError) Error() string
- func (e HttpResponse_DataValidationError) ErrorName() string
- func (e HttpResponse_DataValidationError) Field() string
- func (e HttpResponse_DataValidationError) Key() bool
- func (e HttpResponse_DataValidationError) Reason() string
- type HttpResponse_Data_
- type HttpResponse_Header
- func (*HttpResponse_Header) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse_Header) GetResponse() *prototool.HttpResponse
- func (*HttpResponse_Header) ProtoMessage()
- func (x *HttpResponse_Header) ProtoReflect() protoreflect.Message
- func (x *HttpResponse_Header) Reset()
- func (x *HttpResponse_Header) String() string
- func (m *HttpResponse_Header) Validate() error
- func (m *HttpResponse_Header) ValidateAll() error
- type HttpResponse_HeaderMultiError
- type HttpResponse_HeaderValidationError
- func (e HttpResponse_HeaderValidationError) Cause() error
- func (e HttpResponse_HeaderValidationError) Error() string
- func (e HttpResponse_HeaderValidationError) ErrorName() string
- func (e HttpResponse_HeaderValidationError) Field() string
- func (e HttpResponse_HeaderValidationError) Key() bool
- func (e HttpResponse_HeaderValidationError) Reason() string
- type HttpResponse_Header_
- type HttpResponse_Trailer
- func (*HttpResponse_Trailer) Descriptor() ([]byte, []int)deprecated
- func (*HttpResponse_Trailer) ProtoMessage()
- func (x *HttpResponse_Trailer) ProtoReflect() protoreflect.Message
- func (x *HttpResponse_Trailer) Reset()
- func (x *HttpResponse_Trailer) String() string
- func (m *HttpResponse_Trailer) Validate() error
- func (m *HttpResponse_Trailer) ValidateAll() error
- type HttpResponse_TrailerMultiError
- type HttpResponse_TrailerValidationError
- func (e HttpResponse_TrailerValidationError) Cause() error
- func (e HttpResponse_TrailerValidationError) Error() string
- func (e HttpResponse_TrailerValidationError) ErrorName() string
- func (e HttpResponse_TrailerValidationError) Field() string
- func (e HttpResponse_TrailerValidationError) Key() bool
- func (e HttpResponse_TrailerValidationError) Reason() string
- type HttpResponse_Trailer_
- type HttpResponse_UpgradeData
- func (*HttpResponse_UpgradeData) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse_UpgradeData) GetData() []byte
- func (*HttpResponse_UpgradeData) ProtoMessage()
- func (x *HttpResponse_UpgradeData) ProtoReflect() protoreflect.Message
- func (x *HttpResponse_UpgradeData) Reset()
- func (x *HttpResponse_UpgradeData) String() string
- func (m *HttpResponse_UpgradeData) Validate() error
- func (m *HttpResponse_UpgradeData) ValidateAll() error
- type HttpResponse_UpgradeDataMultiError
- type HttpResponse_UpgradeDataValidationError
- func (e HttpResponse_UpgradeDataValidationError) Cause() error
- func (e HttpResponse_UpgradeDataValidationError) Error() string
- func (e HttpResponse_UpgradeDataValidationError) ErrorName() string
- func (e HttpResponse_UpgradeDataValidationError) Field() string
- func (e HttpResponse_UpgradeDataValidationError) Key() bool
- func (e HttpResponse_UpgradeDataValidationError) Reason() string
- type HttpResponse_UpgradeData_
- type InboundGRPCToOutboundHTTP
- type InboundGRPCToOutboundHTTPStream
- type InboundHTTPToOutboundGRPC
- type InboundStreamToOutboundStream
- type InvalidTransitionCallback
- type JWTAuther
- type JWTCredentials
- type MergeHeadersFunc
- type MessageCallback
- type Pool
- type PoolConn
- type PoolInterface
- type PoolSelf
- type RawCodec
- type RawCodecWithProtoFallback
- type RawFrame
- type RequestsInFlightStatsHandler
- func NewClientRequestsInFlightStatsHandler(m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
- func NewRequestsInFlightStatsHandler(sub string, m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
- func NewServerRequestsInFlightStatsHandler(m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
- func (h *RequestsInFlightStatsHandler) HandleConn(_ context.Context, _ stats.ConnStats)
- func (h *RequestsInFlightStatsHandler) HandleRPC(ctx context.Context, stat stats.RPCStats)
- func (h *RequestsInFlightStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
- func (h *RequestsInFlightStatsHandler) TagRPC(ctx context.Context, inf *stats.RPCTagInfo) context.Context
- type ServerErrorReporter
- type ServerLimiter
- type ServerNoopMaxConnAgeStatsHandler
- func (m ServerNoopMaxConnAgeStatsHandler) HandleConn(ctx context.Context, connStats stats.ConnStats)
- func (m ServerNoopMaxConnAgeStatsHandler) HandleRPC(ctx context.Context, rpcStats stats.RPCStats)
- func (m ServerNoopMaxConnAgeStatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (m ServerNoopMaxConnAgeStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
- type Stream
- type StreamVisitor
- type StreamVisitorOption
- func WithCallback(transitionTo protoreflect.FieldNumber, cb MessageCallback) StreamVisitorOption
- func WithEOFCallback(cb EOFCallback) StreamVisitorOption
- func WithNotExpectingToGet(code codes.Code, transitionTo ...protoreflect.FieldNumber) StreamVisitorOption
- func WithStartState(startState protoreflect.FieldNumber) StreamVisitorOption
- type WriteErrorResponse
Constants ¶
const ( HTTPRequestHeaderFieldNumber protoreflect.FieldNumber = 1 HTTPRequestDataFieldNumber protoreflect.FieldNumber = 2 HTTPRequestTrailerFieldNumber protoreflect.FieldNumber = 3 HTTPRequestUpgradeDataFieldNumber protoreflect.FieldNumber = 4 HTTPResponseHeaderFieldNumber protoreflect.FieldNumber = 1 HTTPResponseDataFieldNumber protoreflect.FieldNumber = 2 HTTPResponseTrailerFieldNumber protoreflect.FieldNumber = 3 HTTPResponseUpgradeDataFieldNumber protoreflect.FieldNumber = 4 )
const (
MetadataAuthorization = "authorization"
)
Variables ¶
var ( HTTPRequestStreamVisitor = NewLazyStreamVisitor(&HttpRequest{}) HTTPResponseStreamVisitor = NewLazyStreamVisitor(&HttpResponse{}) )
var File_internal_tool_grpctool_grpctool_proto protoreflect.FileDescriptor
Functions ¶
func HandleIOError ¶ added in v16.10.0
func HostWithPort ¶ added in v16.4.0
HostWithPort adds port if it was not specified in a URL with a "grpc" or "grpcs" scheme.
func IsStatusError ¶
func MaxConnectionAge2GRPCKeepalive ¶ added in v16.9.0
func NewHeaderMetadata ¶
func NewHeaderMetadata(header http.Header, insecure bool) credentials.PerRPCCredentials
func NewLazyStreamVisitor ¶
func NewLazyStreamVisitor(streamMessage proto.Message) func() *StreamVisitor
func NewTokenCredentials ¶
func NewTokenCredentials(token api.AgentToken, insecure bool) credentials.PerRPCCredentials
func RequestCanceled ¶
func RequestTimedOut ¶
func SplitGRPCMethod ¶ added in v16.9.0
func StartServer ¶
func StatusErrorFromContext ¶
StatusErrorFromContext is a version of status.FromContextError(ctx.Err()).Err() that allows to augment the error message.
func StreamClientLimitingInterceptor ¶
func StreamClientLimitingInterceptor(limiter ClientLimiter) grpc.StreamClientInterceptor
StreamClientLimitingInterceptor returns a new stream server interceptor that performs rate limiting on the request.
func StreamClientValidatingInterceptor ¶
func StreamClientValidatingInterceptor(parentCtx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
StreamClientValidatingInterceptor is a stream client interceptor that performs response stream validation.
func StreamServerErrorReporterInterceptor ¶ added in v16.3.0
func StreamServerErrorReporterInterceptor(errorReporter ServerErrorReporter) grpc.StreamServerInterceptor
func StreamServerLimitingInterceptor ¶
func StreamServerLimitingInterceptor(limiter ServerLimiter) grpc.StreamServerInterceptor
StreamServerLimitingInterceptor returns a new stream server interceptor that performs limiting based on the given context
func UnaryClientLimitingInterceptor ¶
func UnaryClientLimitingInterceptor(limiter ClientLimiter) grpc.UnaryClientInterceptor
UnaryClientLimitingInterceptor returns a new unary client interceptor that performs request rate limiting.
func UnaryClientValidatingInterceptor ¶
func UnaryClientValidatingInterceptor(parentCtx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
UnaryClientValidatingInterceptor is a unary client interceptor that performs response validation.
func UnaryServerErrorReporterInterceptor ¶ added in v16.3.0
func UnaryServerErrorReporterInterceptor(errorReporter ServerErrorReporter) grpc.UnaryServerInterceptor
func UnaryServerLimitingInterceptor ¶
func UnaryServerLimitingInterceptor(limiter ServerLimiter) grpc.UnaryServerInterceptor
UnaryServerLimitingInterceptor returns a new unary server interceptor that performs limiting based on the given context
Types ¶
type CheckHeader ¶ added in v16.10.6
CheckHeader checks the status code and header of the upstream server's HTTP response. It may return an error or alter the header.
type ClientLimiter ¶
type ClientLimiter interface { // Wait blocks until limiter permits an event to happen. // It returns an error if the Context is // canceled, or the expected wait time exceeds the Context's Deadline. Wait(context.Context) error }
ClientLimiter defines the interface to perform client-side request rate limiting. You can use golang.org/x/time/rate.Limiter as an implementation of this interface.
type DialListener ¶
type DialListener struct {
// contains filtered or unexported fields
}
func NewDialListener ¶
func NewDialListener() *DialListener
func (*DialListener) Addr ¶
func (l *DialListener) Addr() net.Addr
func (*DialListener) Close ¶
func (l *DialListener) Close() error
func (*DialListener) DialContext ¶
type DoResponse ¶
type DoResponse struct { // Resp is the server's response to a request. Resp *http.Response // UpgradeConn is the underlying network connection to the server. // May be nil if request was not an Upgrade request or if server decided not to switch protocols // (non-101 response status code). UpgradeConn net.Conn // ConnReader is a buffered reader, wrapping UpgradeConn. Is set when UpgradeConn is set. // Must be used for reading as it may contain buffered bytes that are no longer available directly via UpgradeConn. ConnReader *bufio.Reader }
type EOFCallback ¶
type EOFCallback func() error
type HTTPDo ¶ added in v16.9.0
type HTTPDo func(ctx context.Context, header *HttpRequest_Header, body io.Reader) (DoResponse, error)
HTTPDo makes an HTTP request and returns a response. If an HTTP upgrade was requested, the underlying network connection is also returned. Implementations that don't support Upgrade should return an error.
type HTTPRequestClient ¶ added in v16.9.0
type HTTPRequestClient interface { Send(*HttpRequest) error Recv() (*HttpResponse, error) grpc.ClientStream }
type HandleIOErrorFunc ¶ added in v16.10.0
type HttpRequest ¶
type HttpRequest struct { // Types that are assignable to Message: // // *HttpRequest_Header_ // *HttpRequest_Data_ // *HttpRequest_Trailer_ // *HttpRequest_UpgradeData_ Message isHttpRequest_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
func (*HttpRequest) Descriptor
deprecated
func (*HttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.
func (*HttpRequest) GetData ¶
func (x *HttpRequest) GetData() *HttpRequest_Data
func (*HttpRequest) GetHeader ¶
func (x *HttpRequest) GetHeader() *HttpRequest_Header
func (*HttpRequest) GetMessage ¶
func (m *HttpRequest) GetMessage() isHttpRequest_Message
func (*HttpRequest) GetTrailer ¶
func (x *HttpRequest) GetTrailer() *HttpRequest_Trailer
func (*HttpRequest) GetUpgradeData ¶
func (x *HttpRequest) GetUpgradeData() *HttpRequest_UpgradeData
func (*HttpRequest) ProtoMessage ¶
func (*HttpRequest) ProtoMessage()
func (*HttpRequest) ProtoReflect ¶
func (x *HttpRequest) ProtoReflect() protoreflect.Message
func (*HttpRequest) Reset ¶
func (x *HttpRequest) Reset()
func (*HttpRequest) String ¶
func (x *HttpRequest) String() string
func (*HttpRequest) Validate ¶
func (m *HttpRequest) Validate() error
Validate checks the field values on HttpRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpRequest) ValidateAll ¶
func (m *HttpRequest) ValidateAll() error
ValidateAll checks the field values on HttpRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpRequestMultiError, or nil if none found.
type HttpRequestMultiError ¶
type HttpRequestMultiError []error
HttpRequestMultiError is an error wrapping multiple validation errors returned by HttpRequest.ValidateAll() if the designated constraints aren't met.
func (HttpRequestMultiError) AllErrors ¶
func (m HttpRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequestMultiError) Error ¶
func (m HttpRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequestValidationError ¶
type HttpRequestValidationError struct {
// contains filtered or unexported fields
}
HttpRequestValidationError is the validation error returned by HttpRequest.Validate if the designated constraints aren't met.
func (HttpRequestValidationError) Cause ¶
func (e HttpRequestValidationError) Cause() error
Cause function returns cause value.
func (HttpRequestValidationError) Error ¶
func (e HttpRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequestValidationError) ErrorName ¶
func (e HttpRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequestValidationError) Field ¶
func (e HttpRequestValidationError) Field() string
Field function returns field value.
func (HttpRequestValidationError) Key ¶
func (e HttpRequestValidationError) Key() bool
Key function returns key value.
func (HttpRequestValidationError) Reason ¶
func (e HttpRequestValidationError) Reason() string
Reason function returns reason value.
type HttpRequest_Data ¶
type HttpRequest_Data struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HttpRequest_Data) Descriptor
deprecated
func (*HttpRequest_Data) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest_Data.ProtoReflect.Descriptor instead.
func (*HttpRequest_Data) GetData ¶
func (x *HttpRequest_Data) GetData() []byte
func (*HttpRequest_Data) ProtoMessage ¶
func (*HttpRequest_Data) ProtoMessage()
func (*HttpRequest_Data) ProtoReflect ¶
func (x *HttpRequest_Data) ProtoReflect() protoreflect.Message
func (*HttpRequest_Data) Reset ¶
func (x *HttpRequest_Data) Reset()
func (*HttpRequest_Data) String ¶
func (x *HttpRequest_Data) String() string
func (*HttpRequest_Data) Validate ¶
func (m *HttpRequest_Data) Validate() error
Validate checks the field values on HttpRequest_Data with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpRequest_Data) ValidateAll ¶
func (m *HttpRequest_Data) ValidateAll() error
ValidateAll checks the field values on HttpRequest_Data with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpRequest_DataMultiError, or nil if none found.
type HttpRequest_DataMultiError ¶
type HttpRequest_DataMultiError []error
HttpRequest_DataMultiError is an error wrapping multiple validation errors returned by HttpRequest_Data.ValidateAll() if the designated constraints aren't met.
func (HttpRequest_DataMultiError) AllErrors ¶
func (m HttpRequest_DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequest_DataMultiError) Error ¶
func (m HttpRequest_DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequest_DataValidationError ¶
type HttpRequest_DataValidationError struct {
// contains filtered or unexported fields
}
HttpRequest_DataValidationError is the validation error returned by HttpRequest_Data.Validate if the designated constraints aren't met.
func (HttpRequest_DataValidationError) Cause ¶
func (e HttpRequest_DataValidationError) Cause() error
Cause function returns cause value.
func (HttpRequest_DataValidationError) Error ¶
func (e HttpRequest_DataValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequest_DataValidationError) ErrorName ¶
func (e HttpRequest_DataValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequest_DataValidationError) Field ¶
func (e HttpRequest_DataValidationError) Field() string
Field function returns field value.
func (HttpRequest_DataValidationError) Key ¶
func (e HttpRequest_DataValidationError) Key() bool
Key function returns key value.
func (HttpRequest_DataValidationError) Reason ¶
func (e HttpRequest_DataValidationError) Reason() string
Reason function returns reason value.
type HttpRequest_Data_ ¶
type HttpRequest_Data_ struct {
Data *HttpRequest_Data `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}
type HttpRequest_Header ¶
type HttpRequest_Header struct { Request *prototool.HttpRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Extra *anypb.Any `protobuf:"bytes,2,opt,name=extra,proto3" json:"extra,omitempty"` ContentLength *int64 `protobuf:"varint,3,opt,name=content_length,json=contentLength,proto3,oneof" json:"content_length,omitempty"` // contains filtered or unexported fields }
func (*HttpRequest_Header) Descriptor
deprecated
func (*HttpRequest_Header) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest_Header.ProtoReflect.Descriptor instead.
func (*HttpRequest_Header) GetContentLength ¶
func (x *HttpRequest_Header) GetContentLength() int64
func (*HttpRequest_Header) GetExtra ¶
func (x *HttpRequest_Header) GetExtra() *anypb.Any
func (*HttpRequest_Header) GetRequest ¶
func (x *HttpRequest_Header) GetRequest() *prototool.HttpRequest
func (*HttpRequest_Header) IsRequestWithoutBody ¶
func (x *HttpRequest_Header) IsRequestWithoutBody() bool
IsRequestWithoutBody returns if the request the header belongs to is expected to have no body
func (*HttpRequest_Header) ProtoMessage ¶
func (*HttpRequest_Header) ProtoMessage()
func (*HttpRequest_Header) ProtoReflect ¶
func (x *HttpRequest_Header) ProtoReflect() protoreflect.Message
func (*HttpRequest_Header) Reset ¶
func (x *HttpRequest_Header) Reset()
func (*HttpRequest_Header) String ¶
func (x *HttpRequest_Header) String() string
func (*HttpRequest_Header) Validate ¶
func (m *HttpRequest_Header) Validate() error
Validate checks the field values on HttpRequest_Header with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpRequest_Header) ValidateAll ¶
func (m *HttpRequest_Header) ValidateAll() error
ValidateAll checks the field values on HttpRequest_Header with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpRequest_HeaderMultiError, or nil if none found.
type HttpRequest_HeaderMultiError ¶
type HttpRequest_HeaderMultiError []error
HttpRequest_HeaderMultiError is an error wrapping multiple validation errors returned by HttpRequest_Header.ValidateAll() if the designated constraints aren't met.
func (HttpRequest_HeaderMultiError) AllErrors ¶
func (m HttpRequest_HeaderMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequest_HeaderMultiError) Error ¶
func (m HttpRequest_HeaderMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequest_HeaderValidationError ¶
type HttpRequest_HeaderValidationError struct {
// contains filtered or unexported fields
}
HttpRequest_HeaderValidationError is the validation error returned by HttpRequest_Header.Validate if the designated constraints aren't met.
func (HttpRequest_HeaderValidationError) Cause ¶
func (e HttpRequest_HeaderValidationError) Cause() error
Cause function returns cause value.
func (HttpRequest_HeaderValidationError) Error ¶
func (e HttpRequest_HeaderValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequest_HeaderValidationError) ErrorName ¶
func (e HttpRequest_HeaderValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequest_HeaderValidationError) Field ¶
func (e HttpRequest_HeaderValidationError) Field() string
Field function returns field value.
func (HttpRequest_HeaderValidationError) Key ¶
func (e HttpRequest_HeaderValidationError) Key() bool
Key function returns key value.
func (HttpRequest_HeaderValidationError) Reason ¶
func (e HttpRequest_HeaderValidationError) Reason() string
Reason function returns reason value.
type HttpRequest_Header_ ¶
type HttpRequest_Header_ struct {
Header *HttpRequest_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}
type HttpRequest_Trailer ¶
type HttpRequest_Trailer struct {
// contains filtered or unexported fields
}
func (*HttpRequest_Trailer) Descriptor
deprecated
func (*HttpRequest_Trailer) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest_Trailer.ProtoReflect.Descriptor instead.
func (*HttpRequest_Trailer) ProtoMessage ¶
func (*HttpRequest_Trailer) ProtoMessage()
func (*HttpRequest_Trailer) ProtoReflect ¶
func (x *HttpRequest_Trailer) ProtoReflect() protoreflect.Message
func (*HttpRequest_Trailer) Reset ¶
func (x *HttpRequest_Trailer) Reset()
func (*HttpRequest_Trailer) String ¶
func (x *HttpRequest_Trailer) String() string
func (*HttpRequest_Trailer) Validate ¶
func (m *HttpRequest_Trailer) Validate() error
Validate checks the field values on HttpRequest_Trailer with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpRequest_Trailer) ValidateAll ¶
func (m *HttpRequest_Trailer) ValidateAll() error
ValidateAll checks the field values on HttpRequest_Trailer with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpRequest_TrailerMultiError, or nil if none found.
type HttpRequest_TrailerMultiError ¶
type HttpRequest_TrailerMultiError []error
HttpRequest_TrailerMultiError is an error wrapping multiple validation errors returned by HttpRequest_Trailer.ValidateAll() if the designated constraints aren't met.
func (HttpRequest_TrailerMultiError) AllErrors ¶
func (m HttpRequest_TrailerMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequest_TrailerMultiError) Error ¶
func (m HttpRequest_TrailerMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequest_TrailerValidationError ¶
type HttpRequest_TrailerValidationError struct {
// contains filtered or unexported fields
}
HttpRequest_TrailerValidationError is the validation error returned by HttpRequest_Trailer.Validate if the designated constraints aren't met.
func (HttpRequest_TrailerValidationError) Cause ¶
func (e HttpRequest_TrailerValidationError) Cause() error
Cause function returns cause value.
func (HttpRequest_TrailerValidationError) Error ¶
func (e HttpRequest_TrailerValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequest_TrailerValidationError) ErrorName ¶
func (e HttpRequest_TrailerValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequest_TrailerValidationError) Field ¶
func (e HttpRequest_TrailerValidationError) Field() string
Field function returns field value.
func (HttpRequest_TrailerValidationError) Key ¶
func (e HttpRequest_TrailerValidationError) Key() bool
Key function returns key value.
func (HttpRequest_TrailerValidationError) Reason ¶
func (e HttpRequest_TrailerValidationError) Reason() string
Reason function returns reason value.
type HttpRequest_Trailer_ ¶
type HttpRequest_Trailer_ struct {
Trailer *HttpRequest_Trailer `protobuf:"bytes,3,opt,name=trailer,proto3,oneof"`
}
type HttpRequest_UpgradeData ¶
type HttpRequest_UpgradeData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HttpRequest_UpgradeData) Descriptor
deprecated
func (*HttpRequest_UpgradeData) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest_UpgradeData.ProtoReflect.Descriptor instead.
func (*HttpRequest_UpgradeData) GetData ¶
func (x *HttpRequest_UpgradeData) GetData() []byte
func (*HttpRequest_UpgradeData) ProtoMessage ¶
func (*HttpRequest_UpgradeData) ProtoMessage()
func (*HttpRequest_UpgradeData) ProtoReflect ¶
func (x *HttpRequest_UpgradeData) ProtoReflect() protoreflect.Message
func (*HttpRequest_UpgradeData) Reset ¶
func (x *HttpRequest_UpgradeData) Reset()
func (*HttpRequest_UpgradeData) String ¶
func (x *HttpRequest_UpgradeData) String() string
func (*HttpRequest_UpgradeData) Validate ¶
func (m *HttpRequest_UpgradeData) Validate() error
Validate checks the field values on HttpRequest_UpgradeData with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpRequest_UpgradeData) ValidateAll ¶
func (m *HttpRequest_UpgradeData) ValidateAll() error
ValidateAll checks the field values on HttpRequest_UpgradeData with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpRequest_UpgradeDataMultiError, or nil if none found.
type HttpRequest_UpgradeDataMultiError ¶
type HttpRequest_UpgradeDataMultiError []error
HttpRequest_UpgradeDataMultiError is an error wrapping multiple validation errors returned by HttpRequest_UpgradeData.ValidateAll() if the designated constraints aren't met.
func (HttpRequest_UpgradeDataMultiError) AllErrors ¶
func (m HttpRequest_UpgradeDataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequest_UpgradeDataMultiError) Error ¶
func (m HttpRequest_UpgradeDataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequest_UpgradeDataValidationError ¶
type HttpRequest_UpgradeDataValidationError struct {
// contains filtered or unexported fields
}
HttpRequest_UpgradeDataValidationError is the validation error returned by HttpRequest_UpgradeData.Validate if the designated constraints aren't met.
func (HttpRequest_UpgradeDataValidationError) Cause ¶
func (e HttpRequest_UpgradeDataValidationError) Cause() error
Cause function returns cause value.
func (HttpRequest_UpgradeDataValidationError) Error ¶
func (e HttpRequest_UpgradeDataValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequest_UpgradeDataValidationError) ErrorName ¶
func (e HttpRequest_UpgradeDataValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequest_UpgradeDataValidationError) Field ¶
func (e HttpRequest_UpgradeDataValidationError) Field() string
Field function returns field value.
func (HttpRequest_UpgradeDataValidationError) Key ¶
func (e HttpRequest_UpgradeDataValidationError) Key() bool
Key function returns key value.
func (HttpRequest_UpgradeDataValidationError) Reason ¶
func (e HttpRequest_UpgradeDataValidationError) Reason() string
Reason function returns reason value.
type HttpRequest_UpgradeData_ ¶
type HttpRequest_UpgradeData_ struct {
UpgradeData *HttpRequest_UpgradeData `protobuf:"bytes,4,opt,name=upgradeData,proto3,oneof"`
}
type HttpResponse ¶
type HttpResponse struct { // Types that are assignable to Message: // // *HttpResponse_Header_ // *HttpResponse_Data_ // *HttpResponse_Trailer_ // *HttpResponse_UpgradeData_ Message isHttpResponse_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
func (*HttpResponse) Descriptor
deprecated
func (*HttpResponse) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.
func (*HttpResponse) GetData ¶
func (x *HttpResponse) GetData() *HttpResponse_Data
func (*HttpResponse) GetHeader ¶
func (x *HttpResponse) GetHeader() *HttpResponse_Header
func (*HttpResponse) GetMessage ¶
func (m *HttpResponse) GetMessage() isHttpResponse_Message
func (*HttpResponse) GetTrailer ¶
func (x *HttpResponse) GetTrailer() *HttpResponse_Trailer
func (*HttpResponse) GetUpgradeData ¶
func (x *HttpResponse) GetUpgradeData() *HttpResponse_UpgradeData
func (*HttpResponse) ProtoMessage ¶
func (*HttpResponse) ProtoMessage()
func (*HttpResponse) ProtoReflect ¶
func (x *HttpResponse) ProtoReflect() protoreflect.Message
func (*HttpResponse) Reset ¶
func (x *HttpResponse) Reset()
func (*HttpResponse) String ¶
func (x *HttpResponse) String() string
func (*HttpResponse) Validate ¶
func (m *HttpResponse) Validate() error
Validate checks the field values on HttpResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpResponse) ValidateAll ¶
func (m *HttpResponse) ValidateAll() error
ValidateAll checks the field values on HttpResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpResponseMultiError, or nil if none found.
type HttpResponseMultiError ¶
type HttpResponseMultiError []error
HttpResponseMultiError is an error wrapping multiple validation errors returned by HttpResponse.ValidateAll() if the designated constraints aren't met.
func (HttpResponseMultiError) AllErrors ¶
func (m HttpResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponseMultiError) Error ¶
func (m HttpResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponseValidationError ¶
type HttpResponseValidationError struct {
// contains filtered or unexported fields
}
HttpResponseValidationError is the validation error returned by HttpResponse.Validate if the designated constraints aren't met.
func (HttpResponseValidationError) Cause ¶
func (e HttpResponseValidationError) Cause() error
Cause function returns cause value.
func (HttpResponseValidationError) Error ¶
func (e HttpResponseValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponseValidationError) ErrorName ¶
func (e HttpResponseValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponseValidationError) Field ¶
func (e HttpResponseValidationError) Field() string
Field function returns field value.
func (HttpResponseValidationError) Key ¶
func (e HttpResponseValidationError) Key() bool
Key function returns key value.
func (HttpResponseValidationError) Reason ¶
func (e HttpResponseValidationError) Reason() string
Reason function returns reason value.
type HttpResponse_Data ¶
type HttpResponse_Data struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HttpResponse_Data) Descriptor
deprecated
func (*HttpResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse_Data.ProtoReflect.Descriptor instead.
func (*HttpResponse_Data) GetData ¶
func (x *HttpResponse_Data) GetData() []byte
func (*HttpResponse_Data) ProtoMessage ¶
func (*HttpResponse_Data) ProtoMessage()
func (*HttpResponse_Data) ProtoReflect ¶
func (x *HttpResponse_Data) ProtoReflect() protoreflect.Message
func (*HttpResponse_Data) Reset ¶
func (x *HttpResponse_Data) Reset()
func (*HttpResponse_Data) String ¶
func (x *HttpResponse_Data) String() string
func (*HttpResponse_Data) Validate ¶
func (m *HttpResponse_Data) Validate() error
Validate checks the field values on HttpResponse_Data with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpResponse_Data) ValidateAll ¶
func (m *HttpResponse_Data) ValidateAll() error
ValidateAll checks the field values on HttpResponse_Data with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpResponse_DataMultiError, or nil if none found.
type HttpResponse_DataMultiError ¶
type HttpResponse_DataMultiError []error
HttpResponse_DataMultiError is an error wrapping multiple validation errors returned by HttpResponse_Data.ValidateAll() if the designated constraints aren't met.
func (HttpResponse_DataMultiError) AllErrors ¶
func (m HttpResponse_DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponse_DataMultiError) Error ¶
func (m HttpResponse_DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponse_DataValidationError ¶
type HttpResponse_DataValidationError struct {
// contains filtered or unexported fields
}
HttpResponse_DataValidationError is the validation error returned by HttpResponse_Data.Validate if the designated constraints aren't met.
func (HttpResponse_DataValidationError) Cause ¶
func (e HttpResponse_DataValidationError) Cause() error
Cause function returns cause value.
func (HttpResponse_DataValidationError) Error ¶
func (e HttpResponse_DataValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponse_DataValidationError) ErrorName ¶
func (e HttpResponse_DataValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponse_DataValidationError) Field ¶
func (e HttpResponse_DataValidationError) Field() string
Field function returns field value.
func (HttpResponse_DataValidationError) Key ¶
func (e HttpResponse_DataValidationError) Key() bool
Key function returns key value.
func (HttpResponse_DataValidationError) Reason ¶
func (e HttpResponse_DataValidationError) Reason() string
Reason function returns reason value.
type HttpResponse_Data_ ¶
type HttpResponse_Data_ struct {
Data *HttpResponse_Data `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}
type HttpResponse_Header ¶
type HttpResponse_Header struct { Response *prototool.HttpResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*HttpResponse_Header) Descriptor
deprecated
func (*HttpResponse_Header) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse_Header.ProtoReflect.Descriptor instead.
func (*HttpResponse_Header) GetResponse ¶
func (x *HttpResponse_Header) GetResponse() *prototool.HttpResponse
func (*HttpResponse_Header) ProtoMessage ¶
func (*HttpResponse_Header) ProtoMessage()
func (*HttpResponse_Header) ProtoReflect ¶
func (x *HttpResponse_Header) ProtoReflect() protoreflect.Message
func (*HttpResponse_Header) Reset ¶
func (x *HttpResponse_Header) Reset()
func (*HttpResponse_Header) String ¶
func (x *HttpResponse_Header) String() string
func (*HttpResponse_Header) Validate ¶
func (m *HttpResponse_Header) Validate() error
Validate checks the field values on HttpResponse_Header with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpResponse_Header) ValidateAll ¶
func (m *HttpResponse_Header) ValidateAll() error
ValidateAll checks the field values on HttpResponse_Header with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpResponse_HeaderMultiError, or nil if none found.
type HttpResponse_HeaderMultiError ¶
type HttpResponse_HeaderMultiError []error
HttpResponse_HeaderMultiError is an error wrapping multiple validation errors returned by HttpResponse_Header.ValidateAll() if the designated constraints aren't met.
func (HttpResponse_HeaderMultiError) AllErrors ¶
func (m HttpResponse_HeaderMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponse_HeaderMultiError) Error ¶
func (m HttpResponse_HeaderMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponse_HeaderValidationError ¶
type HttpResponse_HeaderValidationError struct {
// contains filtered or unexported fields
}
HttpResponse_HeaderValidationError is the validation error returned by HttpResponse_Header.Validate if the designated constraints aren't met.
func (HttpResponse_HeaderValidationError) Cause ¶
func (e HttpResponse_HeaderValidationError) Cause() error
Cause function returns cause value.
func (HttpResponse_HeaderValidationError) Error ¶
func (e HttpResponse_HeaderValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponse_HeaderValidationError) ErrorName ¶
func (e HttpResponse_HeaderValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponse_HeaderValidationError) Field ¶
func (e HttpResponse_HeaderValidationError) Field() string
Field function returns field value.
func (HttpResponse_HeaderValidationError) Key ¶
func (e HttpResponse_HeaderValidationError) Key() bool
Key function returns key value.
func (HttpResponse_HeaderValidationError) Reason ¶
func (e HttpResponse_HeaderValidationError) Reason() string
Reason function returns reason value.
type HttpResponse_Header_ ¶
type HttpResponse_Header_ struct {
Header *HttpResponse_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}
type HttpResponse_Trailer ¶
type HttpResponse_Trailer struct {
// contains filtered or unexported fields
}
func (*HttpResponse_Trailer) Descriptor
deprecated
func (*HttpResponse_Trailer) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse_Trailer.ProtoReflect.Descriptor instead.
func (*HttpResponse_Trailer) ProtoMessage ¶
func (*HttpResponse_Trailer) ProtoMessage()
func (*HttpResponse_Trailer) ProtoReflect ¶
func (x *HttpResponse_Trailer) ProtoReflect() protoreflect.Message
func (*HttpResponse_Trailer) Reset ¶
func (x *HttpResponse_Trailer) Reset()
func (*HttpResponse_Trailer) String ¶
func (x *HttpResponse_Trailer) String() string
func (*HttpResponse_Trailer) Validate ¶
func (m *HttpResponse_Trailer) Validate() error
Validate checks the field values on HttpResponse_Trailer with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpResponse_Trailer) ValidateAll ¶
func (m *HttpResponse_Trailer) ValidateAll() error
ValidateAll checks the field values on HttpResponse_Trailer with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpResponse_TrailerMultiError, or nil if none found.
type HttpResponse_TrailerMultiError ¶
type HttpResponse_TrailerMultiError []error
HttpResponse_TrailerMultiError is an error wrapping multiple validation errors returned by HttpResponse_Trailer.ValidateAll() if the designated constraints aren't met.
func (HttpResponse_TrailerMultiError) AllErrors ¶
func (m HttpResponse_TrailerMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponse_TrailerMultiError) Error ¶
func (m HttpResponse_TrailerMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponse_TrailerValidationError ¶
type HttpResponse_TrailerValidationError struct {
// contains filtered or unexported fields
}
HttpResponse_TrailerValidationError is the validation error returned by HttpResponse_Trailer.Validate if the designated constraints aren't met.
func (HttpResponse_TrailerValidationError) Cause ¶
func (e HttpResponse_TrailerValidationError) Cause() error
Cause function returns cause value.
func (HttpResponse_TrailerValidationError) Error ¶
func (e HttpResponse_TrailerValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponse_TrailerValidationError) ErrorName ¶
func (e HttpResponse_TrailerValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponse_TrailerValidationError) Field ¶
func (e HttpResponse_TrailerValidationError) Field() string
Field function returns field value.
func (HttpResponse_TrailerValidationError) Key ¶
func (e HttpResponse_TrailerValidationError) Key() bool
Key function returns key value.
func (HttpResponse_TrailerValidationError) Reason ¶
func (e HttpResponse_TrailerValidationError) Reason() string
Reason function returns reason value.
type HttpResponse_Trailer_ ¶
type HttpResponse_Trailer_ struct {
Trailer *HttpResponse_Trailer `protobuf:"bytes,3,opt,name=trailer,proto3,oneof"`
}
type HttpResponse_UpgradeData ¶
type HttpResponse_UpgradeData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HttpResponse_UpgradeData) Descriptor
deprecated
func (*HttpResponse_UpgradeData) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse_UpgradeData.ProtoReflect.Descriptor instead.
func (*HttpResponse_UpgradeData) GetData ¶
func (x *HttpResponse_UpgradeData) GetData() []byte
func (*HttpResponse_UpgradeData) ProtoMessage ¶
func (*HttpResponse_UpgradeData) ProtoMessage()
func (*HttpResponse_UpgradeData) ProtoReflect ¶
func (x *HttpResponse_UpgradeData) ProtoReflect() protoreflect.Message
func (*HttpResponse_UpgradeData) Reset ¶
func (x *HttpResponse_UpgradeData) Reset()
func (*HttpResponse_UpgradeData) String ¶
func (x *HttpResponse_UpgradeData) String() string
func (*HttpResponse_UpgradeData) Validate ¶
func (m *HttpResponse_UpgradeData) Validate() error
Validate checks the field values on HttpResponse_UpgradeData with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HttpResponse_UpgradeData) ValidateAll ¶
func (m *HttpResponse_UpgradeData) ValidateAll() error
ValidateAll checks the field values on HttpResponse_UpgradeData with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HttpResponse_UpgradeDataMultiError, or nil if none found.
type HttpResponse_UpgradeDataMultiError ¶
type HttpResponse_UpgradeDataMultiError []error
HttpResponse_UpgradeDataMultiError is an error wrapping multiple validation errors returned by HttpResponse_UpgradeData.ValidateAll() if the designated constraints aren't met.
func (HttpResponse_UpgradeDataMultiError) AllErrors ¶
func (m HttpResponse_UpgradeDataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponse_UpgradeDataMultiError) Error ¶
func (m HttpResponse_UpgradeDataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponse_UpgradeDataValidationError ¶
type HttpResponse_UpgradeDataValidationError struct {
// contains filtered or unexported fields
}
HttpResponse_UpgradeDataValidationError is the validation error returned by HttpResponse_UpgradeData.Validate if the designated constraints aren't met.
func (HttpResponse_UpgradeDataValidationError) Cause ¶
func (e HttpResponse_UpgradeDataValidationError) Cause() error
Cause function returns cause value.
func (HttpResponse_UpgradeDataValidationError) Error ¶
func (e HttpResponse_UpgradeDataValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponse_UpgradeDataValidationError) ErrorName ¶
func (e HttpResponse_UpgradeDataValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponse_UpgradeDataValidationError) Field ¶
func (e HttpResponse_UpgradeDataValidationError) Field() string
Field function returns field value.
func (HttpResponse_UpgradeDataValidationError) Key ¶
func (e HttpResponse_UpgradeDataValidationError) Key() bool
Key function returns key value.
func (HttpResponse_UpgradeDataValidationError) Reason ¶
func (e HttpResponse_UpgradeDataValidationError) Reason() string
Reason function returns reason value.
type HttpResponse_UpgradeData_ ¶
type HttpResponse_UpgradeData_ struct {
UpgradeData *HttpResponse_UpgradeData `protobuf:"bytes,4,opt,name=upgradeData,proto3,oneof"`
}
type InboundGRPCToOutboundHTTP ¶ added in v16.9.0
type InboundGRPCToOutboundHTTP struct { Log *zap.Logger HandleProcessingError HandleProcessingErrorFunc HandleIOError HandleIOErrorFunc HTTPDo HTTPDo }
func (*InboundGRPCToOutboundHTTP) Pipe ¶ added in v16.9.0
func (x *InboundGRPCToOutboundHTTP) Pipe(inbound InboundGRPCToOutboundHTTPStream) (retErr error)
type InboundGRPCToOutboundHTTPStream ¶ added in v16.9.0
type InboundGRPCToOutboundHTTPStream interface { Send(*HttpResponse) error grpc.ServerStream }
type InboundHTTPToOutboundGRPC ¶ added in v16.9.0
type InboundHTTPToOutboundGRPC struct { Log *zap.Logger HandleProcessingError HandleProcessingErrorFunc WriteErrorResponse WriteErrorResponse MergeHeaders MergeHeadersFunc CheckHeader CheckHeader }
func (*InboundHTTPToOutboundGRPC) Pipe ¶ added in v16.9.0
func (x *InboundHTTPToOutboundGRPC) Pipe(outboundClient HTTPRequestClient, w http.ResponseWriter, r *http.Request, headerExtra proto.Message)
type InboundStreamToOutboundStream ¶
type InboundStreamToOutboundStream struct { PipeInboundToOutbound func() error PipeOutboundToInbound func() error }
func (*InboundStreamToOutboundStream) Pipe ¶
func (x *InboundStreamToOutboundStream) Pipe() error
type InvalidTransitionCallback ¶
type InvalidTransitionCallback func(from, to protoreflect.FieldNumber, allowed []protoreflect.FieldNumber, message proto.Message) error
InvalidTransitionCallback is a callback that is called when an invalid transition is attempted. 'message' is nil when 'to' is eofState.
type JWTAuther ¶
type JWTAuther struct {
// contains filtered or unexported fields
}
func NewJWTAuther ¶
func (*JWTAuther) StreamServerInterceptor ¶
func (a *JWTAuther) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
StreamServerInterceptor returns a new stream server interceptors that performs per-request JWT auth.
func (*JWTAuther) UnaryServerInterceptor ¶
func (a *JWTAuther) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryServerInterceptor returns a new unary server interceptors that performs per-request JWT auth.
type JWTCredentials ¶ added in v16.9.0
func (*JWTCredentials) GetRequestMetadata ¶ added in v16.9.0
func (*JWTCredentials) RequireTransportSecurity ¶ added in v16.9.0
func (c *JWTCredentials) RequireTransportSecurity() bool
type MergeHeadersFunc ¶
type MessageCallback ¶
type MessageCallback interface{}
MessageCallback is a function with signature func(message someConcreteProtoMessage) error someConcreteProtoMessage must be the type passed to NewStreamVisitor().
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func NewPool(log *zap.Logger, errRep errz.ErrReporter, tlsCreds credentials.TransportCredentials, dialOpts ...grpc.DialOption) *Pool
type PoolConn ¶
type PoolConn interface { grpc.ClientConnInterface Done() }
type PoolInterface ¶
type PoolSelf ¶
type PoolSelf struct {
// contains filtered or unexported fields
}
PoolSelf is a decorator that uses an in-memory connection to dial self rather than going over network.
func NewPoolSelf ¶
func NewPoolSelf(delegate PoolInterface, selfURL string, selfConn grpc.ClientConnInterface) *PoolSelf
type RawCodec ¶
type RawCodec struct { }
RawCodec is a *raw* encoding.Codec. This codec treats a gRPC message frame as raw bytes.
type RawCodecWithProtoFallback ¶
type RawCodecWithProtoFallback struct { }
RawCodecWithProtoFallback is a *raw* encoding.Codec. This codec treats a gRPC message as raw bytes if it's RawFrame and falls back to default proto encoding for other message types.
func (RawCodecWithProtoFallback) Marshal ¶
func (c RawCodecWithProtoFallback) Marshal(v interface{}) ([]byte, error)
func (RawCodecWithProtoFallback) Name ¶
func (c RawCodecWithProtoFallback) Name() string
func (RawCodecWithProtoFallback) Unmarshal ¶
func (c RawCodecWithProtoFallback) Unmarshal(data []byte, v interface{}) error
type RequestsInFlightStatsHandler ¶ added in v16.7.0
type RequestsInFlightStatsHandler struct {
// contains filtered or unexported fields
}
func NewClientRequestsInFlightStatsHandler ¶ added in v16.4.0
func NewClientRequestsInFlightStatsHandler(m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
func NewRequestsInFlightStatsHandler ¶ added in v16.7.0
func NewRequestsInFlightStatsHandler(sub string, m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
func NewServerRequestsInFlightStatsHandler ¶ added in v16.4.0
func NewServerRequestsInFlightStatsHandler(m otelmetric.Meter) (*RequestsInFlightStatsHandler, error)
func (*RequestsInFlightStatsHandler) HandleConn ¶ added in v16.7.0
func (h *RequestsInFlightStatsHandler) HandleConn(_ context.Context, _ stats.ConnStats)
func (*RequestsInFlightStatsHandler) HandleRPC ¶ added in v16.7.0
func (h *RequestsInFlightStatsHandler) HandleRPC(ctx context.Context, stat stats.RPCStats)
func (*RequestsInFlightStatsHandler) TagConn ¶ added in v16.7.0
func (h *RequestsInFlightStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
func (*RequestsInFlightStatsHandler) TagRPC ¶ added in v16.7.0
func (h *RequestsInFlightStatsHandler) TagRPC(ctx context.Context, inf *stats.RPCTagInfo) context.Context
type ServerErrorReporter ¶ added in v16.3.0
type ServerLimiter ¶
type ServerLimiter interface { // Allow should return true and consume one "limitable event" if the limit has not been exceeded. Otherwise, it returns false and does not count towards the limit Allow(ctx context.Context) bool }
ServerLimiter defines the interface to perform server-side request rate limiting. Inspired by golang.org/x/time/rate.Limiter, but accepts a context
type ServerNoopMaxConnAgeStatsHandler ¶
type ServerNoopMaxConnAgeStatsHandler struct { }
func (ServerNoopMaxConnAgeStatsHandler) HandleConn ¶
func (m ServerNoopMaxConnAgeStatsHandler) HandleConn(ctx context.Context, connStats stats.ConnStats)
func (ServerNoopMaxConnAgeStatsHandler) HandleRPC ¶
func (m ServerNoopMaxConnAgeStatsHandler) HandleRPC(ctx context.Context, rpcStats stats.RPCStats)
func (ServerNoopMaxConnAgeStatsHandler) TagConn ¶
func (m ServerNoopMaxConnAgeStatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
func (ServerNoopMaxConnAgeStatsHandler) TagRPC ¶
func (m ServerNoopMaxConnAgeStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
type Stream ¶
type Stream interface {
RecvMsg(m interface{}) error
}
Stream is a grpc.ServerStream or grpc.ClientStream.
type StreamVisitor ¶
type StreamVisitor struct {
// contains filtered or unexported fields
}
StreamVisitor allows to consume messages in a gRPC stream. Message order should follow the automata, defined on fields in a oneof group.
func NewStreamVisitor ¶
func NewStreamVisitor(streamMessage proto.Message) (*StreamVisitor, error)
func (*StreamVisitor) Visit ¶
func (s *StreamVisitor) Visit(stream Stream, opts ...StreamVisitorOption) error
type StreamVisitorOption ¶
type StreamVisitorOption func(*config) error
StreamVisitorOption is an option for the visitor. Must return nil or an error, compatible with the gRPC status package.
func WithCallback ¶
func WithCallback(transitionTo protoreflect.FieldNumber, cb MessageCallback) StreamVisitorOption
WithCallback registers cb to be called when entering transitionTo when parsing the stream. Only one callback can be registered per target
func WithEOFCallback ¶
func WithEOFCallback(cb EOFCallback) StreamVisitorOption
WithEOFCallback sets a callback for end of stream.
func WithNotExpectingToGet ¶
func WithNotExpectingToGet(code codes.Code, transitionTo ...protoreflect.FieldNumber) StreamVisitorOption
WithNotExpectingToGet is used to list fields that the caller is not expecting to get during this Visit() invocation.
func WithStartState ¶
func WithStartState(startState protoreflect.FieldNumber) StreamVisitorOption
WithStartState allows to specify a custom automata start state. The visitor then acts as if it has just visited field with startState number.
type WriteErrorResponse ¶
type WriteErrorResponse func(w http.ResponseWriter, r *http.Request, eResp *ErrResp)
Source Files ¶
- client_limiting.go
- client_validator.go
- dial_listener.go
- grpctool.pb.go
- grpctool.pb.validate.go
- grpctool_extra.go
- header_metadata.go
- http_stream_vititors.go
- inbound_grpc_to_outbound_http.go
- inbound_http_to_outbound_grpc.go
- inbound_stream_to_outbound_stream.go
- jwt_creds.go
- jwt_server_auth.go
- max_conn_age.go
- pool.go
- pool_self.go
- raw_codec.go
- requests_in_flight_stats_handler.go
- server_error_reporter.go
- server_limiting.go
- stream_visitor.go
- stream_visitor_lazy.go
- stream_visitor_options.go
- token_creds.go
- tools.go