gateway

package
v0.7.9-rc14 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerResponse = errors.New("server response")

ErrServerResponse represents the server returning a 4xx or 5xx response code.

Functions

func NewServer

func NewServer(ctx context.Context, log log.Logger, pclient provider.Client, address string) *http.Server

Types

type Client

type Client interface {
	Status(ctx context.Context, host string) (*provider.Status, error)
	SubmitManifest(ctx context.Context, host string, req *manifest.SubmitRequest) error
	LeaseStatus(ctx context.Context, host string, id mtypes.LeaseID) (*cluster.LeaseStatus, error)
	ServiceStatus(ctx context.Context, host string, id mtypes.LeaseID, service string) (*cluster.ServiceStatus, error)
	ServiceLogs(ctx context.Context, host string, id mtypes.LeaseID, service string, follow bool, tailLines int64) (*ServiceLogs, error)
}

Client defines the methods available for connecting to the gateway server.

func NewClient

func NewClient() Client

NewClient returns a new Client

type ServiceLogMessage added in v0.7.5

type ServiceLogMessage struct {
	Name    string `json:"name"`
	Message string `json:"message"`
}

type ServiceLogs added in v0.7.5

type ServiceLogs struct {
	Stream <-chan ServiceLogMessage
}

Jump to

Keyboard shortcuts

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