router

package
v0.0.0-...-a919306 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CorsHeaders []string
	CorsMethods []string

	// Hosts is a list of addresses for the API.
	Hosts []string
}

Config provides the API server configuration

type Router

type Router struct {
	// contains filtered or unexported fields
}

func New

func New(configs Config) *Router

func (*Router) SetupRouter

func (r *Router) SetupRouter(scaleservice *scaleservice.ScaleService) http.Handler

SetupRouter initializes the main router the API server uses.

func (*Router) SetupSvcConn

func (r *Router) SetupSvcConn(ctx context.Context, svcAddr string) (*grpc.ClientConn, error)

Jump to

Keyboard shortcuts

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