handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package handler provides the ability to interact with k8s or third-party services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControlTaskResponse

func ControlTaskResponse(status int, body string) []byte

ControlTaskResponse packages the body message to clustermessage.ControllerTaskResponse and serialize it.

func Response

Response packages the body message to clustermessage.ClusterMessage.

Types

type Handler

type Handler interface {
	// Do handle the request and transmit to corresponding server.
	Do(*clustermessage.ClusterMessage) (*clustermessage.ClusterMessage, error)
}

Handler is shim handler interface that contains the methods required to interact to remote server.

func NewHTTPProxyHandler

func NewHTTPProxyHandler(address string) Handler

NewHTTPProxyHandler returns a new httpProxyHandler.

func NewK8sHandler

func NewK8sHandler(cl kubernetes.Interface) Handler

NewK8sHandler returns a new k8sHandler.

Jump to

Keyboard shortcuts

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