configure

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigRetrieverOption

func DefaultConfigRetrieverOption() (option configures.RetrieverOption)

Types

type Cluster

type Cluster struct {
	DevMode           bool            `json:"devMode"`
	NodesProxyAddress string          `json:"nodesProxyAddress"`
	Kind              string          `json:"kind"`
	Client            ClusterClient   `json:"client"`
	Options           json.RawMessage `json:"options"`
}

type ClusterClient

type ClusterClient struct {
	MaxIdleConnSeconds    int `json:"maxIdleConnSeconds"`
	MaxConnsPerHost       int `json:"maxConnsPerHost"`
	MaxIdleConnsPerHost   int `json:"maxIdleConnsPerHost"`
	RequestTimeoutSeconds int `json:"requestTimeoutSeconds"`
}

type Config

type Config struct {
	AppId   string     `json:"appId"`
	Name    string     `json:"name"`
	Runtime *Runtime   `json:"runtime"`
	Log     *LogConfig `json:"log"`
	OAS     *OAS       `json:"oas"`
	Server  *Server    `json:"server"`
	Cluster *Cluster   `json:"cluster"`
}

type Cors

type Cors struct {
	AllowedOrigins   []string `json:"allowedOrigins"`
	AllowedHeaders   []string `json:"allowedHeaders"`
	ExposedHeaders   []string `json:"exposedHeaders"`
	AllowCredentials bool     `json:"allowCredentials"`
	MaxAge           int      `json:"maxAge"`
}

type LogConfig

type LogConfig struct {
	Level     string `json:"level"`
	Formatter string `json:"formatter"`
	Color     bool   `json:"color"`
}

type OAS

type OAS struct {
	Title       string      `json:"title"`
	Description string      `json:"description"`
	Terms       string      `json:"terms"`
	Contact     *OASContact `json:"contact"`
	License     *OASLicense `json:"license"`
	Servers     []OASServer `json:"servers"`
}

type OASContact

type OASContact struct {
	Name  string `json:"name"`
	Url   string `json:"url"`
	Email string `json:"email"`
}

type OASLicense

type OASLicense struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

type OASServer

type OASServer struct {
	URL         string `json:"url"`
	Description string `json:"description"`
}

type Runtime

type Runtime struct {
	MaxWorkers           int `json:"maxWorkers"`
	WorkerMaxIdleSeconds int `json:"workerMaxIdleSeconds"`
	HandleTimeoutSeconds int `json:"handleTimeoutSeconds"`
}

type Server

type Server struct {
	Port         int                        `json:"port"`
	Cors         *Cors                      `json:"cors"`
	Websocket    *Websocket                 `json:"websocket"`
	TLS          *TLS                       `json:"tls"`
	Options      json.RawMessage            `json:"options"`
	Interceptors map[string]json.RawMessage `json:"interceptors"`
}

type TLS

type TLS struct {
	// Kind
	// ACME
	// SSC(SELF-SIGN-CERT)
	// DEFAULT
	Kind    string          `json:"kind"`
	Options json.RawMessage `json:"options"`
}

func (*TLS) Config

func (config *TLS) Config() (serverTLS *tls.Config, clientTLS *tls.Config, err error)

type Websocket added in v0.12.6

type Websocket struct {
	ReadBufferSize    string `json:"readBufferSize"`
	WriteBufferSize   string `json:"writeBufferSize"`
	EnableCompression bool   `json:"enableCompression"`
	MaxConns          int64  `json:"maxConns"`
}

Jump to

Keyboard shortcuts

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