http

package
v0.20211202.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "PROTORPC",
		2: "GRPC",
		3: "LEGACYPOR",
		4: "MULTIPLE",
	}
	Protocol_value = map[string]int32{
		"UNSPECIFIED": 0,
		"PROTORPC":    1,
		"GRPC":        2,
		"LEGACYPOR":   3,
		"MULTIPLE":    4,
	}
)

Enum value maps for Protocol.

View Source
var (
	HttpRequestPriority_name = map[int32]string{
		0: "NORMAL",
		1: "LOW",
	}
	HttpRequestPriority_value = map[string]int32{
		"NORMAL": 0,
		"LOW":    1,
	}
)

Enum value maps for HttpRequestPriority.

View Source
var (
	HttpRequestRetryPolicy_name = map[int32]string{
		0: "DEFAULT",
		1: "DEFER_ON_DISK",
		2: "INFINITELY_RETRY_RECOVERABLE_ERRORS",
	}
	HttpRequestRetryPolicy_value = map[string]int32{
		"DEFAULT":                             0,
		"DEFER_ON_DISK":                       1,
		"INFINITELY_RETRY_RECOVERABLE_ERRORS": 2,
	}
)

Enum value maps for HttpRequestRetryPolicy.

View Source
var (
	// optional http.HttpOptions http_options = 50001;
	E_HttpOptions = &file_ext_proto_extTypes[1]
)

Extension fields to descriptor.MethodOptions.

View Source
var (
	// optional http.HttpServerOptions http_server_options = 50002;
	E_HttpServerOptions = &file_ext_proto_extTypes[0]
)

Extension fields to descriptor.ServiceOptions.

View Source
var (
	// optional http.ProxyOptions proxy_options = 50003;
	//
	// Deprecated: Do not use.
	E_ProxyOptions = &file_ext_proto_extTypes[2]
)

Extension fields to descriptor.MessageOptions.

Functions

This section is empty.

Types

type HttpOptions

type HttpOptions struct {

	// URL path to the HTTP endpoint.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The HTTP verb/action, (i.e., GET, POST etc.).
	Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	// The application code that implements the endpoint.
	Impl string `protobuf:"bytes,3,opt,name=impl,proto3" json:"impl,omitempty"`
	// List of errors by status code that may be returned by the endpoint.
	ErrorOverrides []*HttpStatusError `protobuf:"bytes,4,rep,name=error_overrides,json=errorOverrides,proto3" json:"error_overrides,omitempty"`
	// Single error that may be returned by the endpoint (not specific to
	// status code).
	ErrorType string `protobuf:"bytes,5,opt,name=error_type,json=errorType,proto3" json:"error_type,omitempty"`
	// When `true`, `client_poll_ms` or `push_async_only` must also be specified.
	// To enable polling from the Pusher service (versus pub-sub),
	// see `server_poll_ms`.
	PushEnabled bool `protobuf:"varint,6,opt,name=push_enabled,json=pushEnabled,proto3" json:"push_enabled,omitempty"`
	// The polling rate (in milliseconds) at which mobile clients should
	// request this resource.
	ClientPollMs uint64 `protobuf:"varint,7,opt,name=client_poll_ms,json=clientPollMs,proto3" json:"client_poll_ms,omitempty"`
	// The polling rate (in milliseconds) at which the Pusher service should
	// request this resource. If not specified and `push_enabled = true`,
	// only pub-sub will be used.
	ServerPollMs uint64 `protobuf:"varint,8,opt,name=server_poll_ms,json=serverPollMs,proto3" json:"server_poll_ms,omitempty"`
	// Specifies that an events response should be cached by Pusher. This
	// setting is used in the case that an event has many subscribers that
	// would receive the same pushed response and prevents a thundering herd to
	// the upstream service.
	PushCacheEnabled bool `protobuf:"varint,9,opt,name=push_cache_enabled,json=pushCacheEnabled,proto3" json:"push_cache_enabled,omitempty"`
	// push_cache_ttl_ms specifies the cache TTL for pushed responses when `cached` is enabled.
	PushCacheTtlMs int64 `protobuf:"varint,10,opt,name=push_cache_ttl_ms,json=pushCacheTtlMs,proto3" json:"push_cache_ttl_ms,omitempty"`
	// Specifies which topic an event will be published onto by Pusher. String
	// substitution is used to format each topic using the event field definitions.
	// Example:
	// "pb.push.v1.events.:event_id" will replace `:event_id` with the value found in the
	// `event_id` field defined on the event. An error is thrown if the replacement
	// field is not defined.
	PushTopic string `protobuf:"bytes,11,opt,name=push_topic,json=pushTopic,proto3" json:"push_topic,omitempty"`
	// The registered upstream from pusher containing the pushed route.
	PushServiceName string `protobuf:"bytes,12,opt,name=push_service_name,json=pushServiceName,proto3" json:"push_service_name,omitempty"`
	// Internal path implemented by the service. If this is a public route,
	// envoy will rewrite the url rule to point to the internal path on the service
	InternalPath string `protobuf:"bytes,13,opt,name=internal_path,json=internalPath,proto3" json:"internal_path,omitempty"`
	// Priority of the HTTP request being made. Lower priority requests may be
	// deferred (i.e., in conditions of degraded network).
	RequestPriority HttpRequestPriority `` /* 138-byte string literal not displayed */
	// Defines a retry policy for a given request.
	RequestRetryPolicy HttpRequestRetryPolicy `` /* 152-byte string literal not displayed */
	// If true, pusher will not make an initial request, and will not poll.
	// server_poll_ms must be 0/omitted if true.
	// client_poll_ms must be 0/omitted if true.
	PushAsyncOnly bool `protobuf:"varint,16,opt,name=push_async_only,json=pushAsyncOnly,proto3" json:"push_async_only,omitempty"`
	// Defines a retry group for a given request. Used only when `request_retry_policy` is equal
	// to `DEFER_ON_DISK`, ignored otherwise. Requests which belong to the same retry group
	// are retried one at a time in the FIFO order. This allows a caller to specify the
	// chain of network requests which are guaranteed to be performed one after another.
	// For example, if requests 1 and 2 are part of retry group SOME_GROUP, request 2 will only
	// be performed after request 1 finishes with a success. If request 1 fails request 2
	// is canceled. A request without a specified `request_retry_group` is always performed
	// immediately after it's started by a caller.
	RequestRetryGroup string `protobuf:"bytes,17,opt,name=request_retry_group,json=requestRetryGroup,proto3" json:"request_retry_group,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpOptions) Descriptor deprecated

func (*HttpOptions) Descriptor() ([]byte, []int)

Deprecated: Use HttpOptions.ProtoReflect.Descriptor instead.

func (*HttpOptions) GetClientPollMs

func (x *HttpOptions) GetClientPollMs() uint64

func (*HttpOptions) GetErrorOverrides

func (x *HttpOptions) GetErrorOverrides() []*HttpStatusError

func (*HttpOptions) GetErrorType

func (x *HttpOptions) GetErrorType() string

func (*HttpOptions) GetImpl

func (x *HttpOptions) GetImpl() string

func (*HttpOptions) GetInternalPath

func (x *HttpOptions) GetInternalPath() string

func (*HttpOptions) GetMethod

func (x *HttpOptions) GetMethod() string

func (*HttpOptions) GetPath

func (x *HttpOptions) GetPath() string

func (*HttpOptions) GetPushAsyncOnly

func (x *HttpOptions) GetPushAsyncOnly() bool

func (*HttpOptions) GetPushCacheEnabled

func (x *HttpOptions) GetPushCacheEnabled() bool

func (*HttpOptions) GetPushCacheTtlMs

func (x *HttpOptions) GetPushCacheTtlMs() int64

func (*HttpOptions) GetPushEnabled

func (x *HttpOptions) GetPushEnabled() bool

func (*HttpOptions) GetPushServiceName

func (x *HttpOptions) GetPushServiceName() string

func (*HttpOptions) GetPushTopic

func (x *HttpOptions) GetPushTopic() string

func (*HttpOptions) GetRequestPriority

func (x *HttpOptions) GetRequestPriority() HttpRequestPriority

func (*HttpOptions) GetRequestRetryGroup

func (x *HttpOptions) GetRequestRetryGroup() string

func (*HttpOptions) GetRequestRetryPolicy

func (x *HttpOptions) GetRequestRetryPolicy() HttpRequestRetryPolicy

func (*HttpOptions) GetServerPollMs

func (x *HttpOptions) GetServerPollMs() uint64

func (*HttpOptions) ProtoMessage

func (*HttpOptions) ProtoMessage()

func (*HttpOptions) ProtoReflect

func (x *HttpOptions) ProtoReflect() protoreflect.Message

func (*HttpOptions) Reset

func (x *HttpOptions) Reset()

func (*HttpOptions) String

func (x *HttpOptions) String() string

type HttpRequestPriority

type HttpRequestPriority int32

Indicates a priority tier for a given HTTP request.

const (
	// Default request priority.
	HttpRequestPriority_NORMAL HttpRequestPriority = 0
	// Low priority, which can result in the request being deferred.
	HttpRequestPriority_LOW HttpRequestPriority = 1
)

func (HttpRequestPriority) Descriptor

func (HttpRequestPriority) Enum

func (HttpRequestPriority) EnumDescriptor deprecated

func (HttpRequestPriority) EnumDescriptor() ([]byte, []int)

Deprecated: Use HttpRequestPriority.Descriptor instead.

func (HttpRequestPriority) Number

func (HttpRequestPriority) String

func (x HttpRequestPriority) String() string

func (HttpRequestPriority) Type

type HttpRequestRetryPolicy

type HttpRequestRetryPolicy int32

Controls the retry policy of a given HTTP request.

const (
	// Perform an original request and up to 3 retries with exponential backoff and jittering.
	HttpRequestRetryPolicy_DEFAULT HttpRequestRetryPolicy = 0
	// Perform an original request and keep retrying with exponential backoff and jittering until the
	// requests succeeds or fails with a non retryable status error returned from a server. Store the
	// information about a request on a disk so that all on the flight deferred requests can be restarted
	// when the app is relaunched.
	HttpRequestRetryPolicy_DEFER_ON_DISK HttpRequestRetryPolicy = 1
	// Perform an original request and keep retrying with exponential backoff and jittering until the
	// requests fails with a non-retryable status code, or is canceled. The request is not persisted to disk.
	HttpRequestRetryPolicy_INFINITELY_RETRY_RECOVERABLE_ERRORS HttpRequestRetryPolicy = 2
)

func (HttpRequestRetryPolicy) Descriptor

func (HttpRequestRetryPolicy) Enum

func (HttpRequestRetryPolicy) EnumDescriptor deprecated

func (HttpRequestRetryPolicy) EnumDescriptor() ([]byte, []int)

Deprecated: Use HttpRequestRetryPolicy.Descriptor instead.

func (HttpRequestRetryPolicy) Number

func (HttpRequestRetryPolicy) String

func (x HttpRequestRetryPolicy) String() string

func (HttpRequestRetryPolicy) Type

type HttpServerOptions

type HttpServerOptions struct {

	// Is this an http server
	IsHttpServer bool `protobuf:"varint,1,opt,name=isHttpServer,proto3" json:"isHttpServer,omitempty"`
	// Overrides the service name when generating Python Flask clients
	// The default behavior is to use the proto file's package name as
	// the host.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// If isHttpServer is true, a Python gRPC client will not be generated for
	// the service. Setting this to true will result in a gRPC client being
	// generated.
	GenerateGrpcClient bool `protobuf:"varint,3,opt,name=generate_grpc_client,json=generateGrpcClient,proto3" json:"generate_grpc_client,omitempty"`
	// Legacy protos-over-REST (PoR) server stubs will only be generated if this
	// annotation is set to true. PoR code generation is deprecated in favor of
	// Flask-Protobuf and being actively removed. Do not add this annotation
	// for any new services.
	//
	// Deprecated: Do not use.
	GenerateLegacyServerStubs bool `` /* 141-byte string literal not displayed */
	// Legacy protos-over-REST (PoR) clients will only be generated if this
	// annotation is set to true. PoR code generation is deprecated in favor of
	// Flask-Protobuf and being actively removed. Do not add this annotation
	// for any new services.
	//
	// Deprecated: Do not use.
	GenerateLegacyHttpClient bool `` /* 138-byte string literal not displayed */
	// Protocol replaces the bool option isHttpServer and makes the protocol used
	// by the implementing server explicit
	Protocol Protocol `protobuf:"varint,6,opt,name=protocol,proto3,enum=http.Protocol" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpServerOptions) Descriptor deprecated

func (*HttpServerOptions) Descriptor() ([]byte, []int)

Deprecated: Use HttpServerOptions.ProtoReflect.Descriptor instead.

func (*HttpServerOptions) GetGenerateGrpcClient

func (x *HttpServerOptions) GetGenerateGrpcClient() bool

func (*HttpServerOptions) GetGenerateLegacyHttpClient deprecated

func (x *HttpServerOptions) GetGenerateLegacyHttpClient() bool

Deprecated: Do not use.

func (*HttpServerOptions) GetGenerateLegacyServerStubs deprecated

func (x *HttpServerOptions) GetGenerateLegacyServerStubs() bool

Deprecated: Do not use.

func (*HttpServerOptions) GetIsHttpServer

func (x *HttpServerOptions) GetIsHttpServer() bool

func (*HttpServerOptions) GetName

func (x *HttpServerOptions) GetName() string

func (*HttpServerOptions) GetProtocol

func (x *HttpServerOptions) GetProtocol() Protocol

func (*HttpServerOptions) ProtoMessage

func (*HttpServerOptions) ProtoMessage()

func (*HttpServerOptions) ProtoReflect

func (x *HttpServerOptions) ProtoReflect() protoreflect.Message

func (*HttpServerOptions) Reset

func (x *HttpServerOptions) Reset()

func (*HttpServerOptions) String

func (x *HttpServerOptions) String() string

type HttpStatusError

type HttpStatusError struct {

	// The status code for which this error is valid.
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// Fully qualified protobuf name of the error message that may be used with
	// the status code.
	// If protobuf supported generics, this would essentially be a
	// T: Message.Type & Error.
	// Consumers will deserialize based on the type name (i.e., foo.bar.Error).
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Represents the protobuf message type of an error that may be returned for a given HTTP status code.

func (*HttpStatusError) Descriptor deprecated

func (*HttpStatusError) Descriptor() ([]byte, []int)

Deprecated: Use HttpStatusError.ProtoReflect.Descriptor instead.

func (*HttpStatusError) GetCode

func (x *HttpStatusError) GetCode() int32

func (*HttpStatusError) GetType

func (x *HttpStatusError) GetType() string

func (*HttpStatusError) ProtoMessage

func (*HttpStatusError) ProtoMessage()

func (*HttpStatusError) ProtoReflect

func (x *HttpStatusError) ProtoReflect() protoreflect.Message

func (*HttpStatusError) Reset

func (x *HttpStatusError) Reset()

func (*HttpStatusError) String

func (x *HttpStatusError) String() string

type Protocol

type Protocol int32

Protocol used by the implementing service

const (
	// Unspecified (do not use)
	Protocol_UNSPECIFIED Protocol = 0
	// ProtoRPC
	Protocol_PROTORPC Protocol = 1
	// gRPC
	Protocol_GRPC Protocol = 2
	// Legacy Protos-over-REST
	Protocol_LEGACYPOR Protocol = 3
	// Multiple protocols (e.g. gRPC & ProtoRPC for the same service)
	Protocol_MULTIPLE Protocol = 4
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

func (Protocol) EnumDescriptor() ([]byte, []int)

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type ProxyOptions deprecated

type ProxyOptions struct {

	// Legacy python proxies will only be generated if this annotation is set
	// to true. Proxies are deprecated in favor of using the official messages
	// and are being actively removed. Do not add this annotation for any new
	// messages.
	//
	// Deprecated: Do not use.
	GenerateLegacyProxies bool `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

ProxyOptions capture the options related to the legacy proxies. Proxies are deprecated and should no longer be used.

Deprecated: Do not use.

func (*ProxyOptions) Descriptor deprecated

func (*ProxyOptions) Descriptor() ([]byte, []int)

Deprecated: Use ProxyOptions.ProtoReflect.Descriptor instead.

func (*ProxyOptions) GetGenerateLegacyProxies deprecated

func (x *ProxyOptions) GetGenerateLegacyProxies() bool

Deprecated: Do not use.

func (*ProxyOptions) ProtoMessage

func (*ProxyOptions) ProtoMessage()

func (*ProxyOptions) ProtoReflect

func (x *ProxyOptions) ProtoReflect() protoreflect.Message

func (*ProxyOptions) Reset

func (x *ProxyOptions) Reset()

func (*ProxyOptions) String

func (x *ProxyOptions) String() string

Jump to

Keyboard shortcuts

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