Documentation ¶
Overview ¶
* Copyright 2020 The Knative Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- func CreateHandler(handler nethttp.Handler) nethttp.Handler
- func NewDefaultClient(target ...string) (cloudevents.Client, error)
- func NewDefaultHTTPClient(t *cloudevents.HTTPTransport, opts ...client.Option) (cloudevents.Client, error)
- func WithShutdownTimeout(ctx context.Context, timeout time.Duration) context.Context
- func WriteHttpRequestWithAdditionalHeaders(ctx context.Context, message binding.Message, req *nethttp.Request, ...) error
- type ConnectionArgs
- type HttpMessageReceiver
- type HttpMessageSender
Constants ¶
const (
DefaultShutdownTimeout = time.Minute * 1
)
Variables ¶
This section is empty.
Functions ¶
func NewDefaultClient ¶
func NewDefaultClient(target ...string) (cloudevents.Client, error)
func NewDefaultHTTPClient ¶ added in v0.14.0
func NewDefaultHTTPClient(t *cloudevents.HTTPTransport, opts ...client.Option) (cloudevents.Client, error)
NewDefaultHTTPClient creates a new client from an HTTP transport.
func WithShutdownTimeout ¶ added in v0.14.0
Types ¶
type ConnectionArgs ¶ added in v0.10.0
type ConnectionArgs struct { // MaxIdleConns refers to the max idle connections, as in net/http/transport. MaxIdleConns int // MaxIdleConnsPerHost refers to the max idle connections per host, as in net/http/transport. MaxIdleConnsPerHost int }
ConnectionArgs allow to configure connection parameters to the underlying HTTP Client transport.
func (*ConnectionArgs) ConfigureTransport ¶ added in v0.14.0
func (ca *ConnectionArgs) ConfigureTransport(transport *nethttp.Transport)
func (*ConnectionArgs) NewDefaultHTTPTransport ¶ added in v0.14.0
func (ca *ConnectionArgs) NewDefaultHTTPTransport() *nethttp.Transport
type HttpMessageReceiver ¶ added in v0.14.0
type HttpMessageReceiver struct {
// contains filtered or unexported fields
}
func NewHttpMessageReceiver ¶ added in v0.14.0
func NewHttpMessageReceiver(port int) *HttpMessageReceiver
func (*HttpMessageReceiver) StartListen ¶ added in v0.14.0
Blocking
type HttpMessageSender ¶ added in v0.14.0
func NewHttpMessageSender ¶ added in v0.14.0
func NewHttpMessageSender(connectionArgs *ConnectionArgs, target string) (*HttpMessageSender, error)