kncloudevents

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 9 Imported by: 109

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

View Source
const (
	DefaultShutdownTimeout = time.Minute * 1
)

Variables

This section is empty.

Functions

func CreateHandler added in v0.14.0

func CreateHandler(handler nethttp.Handler) nethttp.Handler

func WithShutdownTimeout added in v0.14.0

func WithShutdownTimeout(ctx context.Context, timeout time.Duration) context.Context

func WriteHttpRequestWithAdditionalHeaders added in v0.14.0

func WriteHttpRequestWithAdditionalHeaders(ctx context.Context, message binding.Message, req *nethttp.Request, additionalHeaders nethttp.Header, transformers ...binding.Transformer) error

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)

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

func (recv *HttpMessageReceiver) StartListen(ctx context.Context, handler nethttp.Handler) error

Blocking

type HttpMessageSender added in v0.14.0

type HttpMessageSender struct {
	Client *nethttp.Client
	Target string
}

func NewHttpMessageSender added in v0.14.0

func NewHttpMessageSender(connectionArgs *ConnectionArgs, target string) (*HttpMessageSender, error)

func (*HttpMessageSender) NewCloudEventRequest added in v0.14.0

func (s *HttpMessageSender) NewCloudEventRequest(ctx context.Context) (*nethttp.Request, error)

func (*HttpMessageSender) NewCloudEventRequestWithTarget added in v0.14.0

func (s *HttpMessageSender) NewCloudEventRequestWithTarget(ctx context.Context, target string) (*nethttp.Request, error)

func (*HttpMessageSender) Send added in v0.14.0

Jump to

Keyboard shortcuts

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