webapp

package
v0.0.0-...-8fbb377 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright © 2020 Denis Rendler <connect@rendler.me>

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.

Copyright © 2020 Denis Rendler <connect@rendler.me>

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.

Copyright © 2020 Denis Rendler <connect@rendler.me>

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.

Copyright © 2020 Denis Rendler <connect@rendler.me>

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.

Copyright © 2020 Denis Rendler <connect@rendler.me>

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

This section is empty.

Variables

This section is empty.

Functions

func BootstrapRouter

func BootstrapRouter(c *config.Parameters, apis []WebRouting, roots []WebRouting) *mux.Router

Types

type HttpServer

type HttpServer struct {
	Server
	// contains filtered or unexported fields
}

HttpServer A representation of a simple HTTP server

func (HttpServer) GetListeningAddr

func (http HttpServer) GetListeningAddr() string

GetListeningAddr Get th IP:Port that the server has registered

func (HttpServer) ListenAndServe

func (http HttpServer) ListenAndServe() error

ListenAndServe puts the server in listening mode

func (HttpServer) Shutdown

func (http HttpServer) Shutdown(ctx context.Context) error

Shutdown the server

type HttpsServer

type HttpsServer struct {
	Server
	// contains filtered or unexported fields
}

HttpsServer A representation of a HTTP server that routes all traffic to the HTTPS server serving the API and possibly the static app

func (HttpsServer) GetListeningAddr

func (https HttpsServer) GetListeningAddr() string

Get a list of IP:Port that the servers have registered

func (HttpsServer) ListenAndServe

func (https HttpsServer) ListenAndServe() error

func (HttpsServer) Shutdown

func (https HttpsServer) Shutdown(ctx context.Context) error

type Server

type Server interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
	GetListeningAddr() string
}

func BootstrapServer

func BootstrapServer(cfg *config.Parameters, router *mux.Router) (Server, error)

BootstrapServer configures the server according to options set

type WebRouting

type WebRouting interface {
	RegisterRoutes(r *mux.Router)
}

Directories

Path Synopsis
* Copyright (c) 2020.
* Copyright (c) 2020.

Jump to

Keyboard shortcuts

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