Documentation
¶
Overview ¶
Package server contains the ClientAPI HTTP-REST and MarbleAPI gRPC server.
Index ¶
- func CreateServeMux(cc core.ClientCore, promFactory *promauto.Factory) serveMux
- func RunClientServer(mux http.Handler, address string, tlsConfig *tls.Config, zapLogger *zap.Logger)
- func RunMarbleServer(core *core.Core, addr string, addrChan chan string, errChan chan error, ...)
- func RunPrometheusServer(address string, zapLogger *zap.Logger, reg *prometheus.Registry)
- type CertQuoteResp
- type GeneralResponse
- type ManifestSignatureResp
- type RecoveryDataResp
- type RecoveryStatusResp
- type StatusResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServeMux ¶
func CreateServeMux(cc core.ClientCore, promFactory *promauto.Factory) serveMux
CreateServeMux creates a mux that serves the client API.
func RunClientServer ¶
func RunClientServer(mux http.Handler, address string, tlsConfig *tls.Config, zapLogger *zap.Logger)
RunClientServer runs a HTTP server serving mux.
func RunMarbleServer ¶
func RunMarbleServer(core *core.Core, addr string, addrChan chan string, errChan chan error, zapLogger *zap.Logger, promRegistry *prometheus.Registry)
RunMarbleServer starts a gRPC with the given Coordinator core. `address` is the desired TCP address like "localhost:0". The effective TCP address is returned via `addrChan`.
func RunPrometheusServer ¶ added in v0.1.1
func RunPrometheusServer(address string, zapLogger *zap.Logger, reg *prometheus.Registry)
RunPrometheusServer runs a HTTP server handling the prometheus metrics endpoint.
Types ¶
type CertQuoteResp ¶ added in v0.5.0
type GeneralResponse ¶ added in v0.3.1
type GeneralResponse struct {
Status string `json:"status"`
Data interface{} `json:"data"`
Message string `json:"message,omitempty"` // only used when status = "error"
}
GeneralResponse is a wrapper for all our REST API responses to follow the JSend style: https://github.com/omniti-labs/jsend swagger:model
type ManifestSignatureResp ¶ added in v0.5.0
type ManifestSignatureResp struct {
// The manifest signature - signed by the root ECDSA key.
// example: MEYCIQCmkqOP0Jf1v5ZR0vUYNnMxmy8j9aYR3Zdemuz8EXNQ4gIhAMk6MCg00Rowilui/66tHrkETMmkPmOktMKXQqv6NmnN
// swagger:strfmt byte
ManifestSignatureRootECDSA []byte
// A SHA-256 of the currently set manifest. Does not change when an update has been applied.
// example: 3fff78e99dd9bd801e0a3a22b7f7a24a492302c4d00546d18c7f7ed6e26e95c3
ManifestSignature string
// The currently set manifest in base64 encoding. Does not change when an update has been applied.
Manifest []byte
}
type RecoveryDataResp ¶ added in v0.5.0
type RecoveryDataResp struct {
// An array containing key-value mappings for encrypted secrets to be used for recovering the Coordinator in case of disaster recovery.
// The key matches each supplied key from RecoveryKeys in the manifest.
RecoverySecrets map[string]string
}
RecoveryDataResp contains RSA-encrypted AES state sealing key with public key specified by user in manifest
type RecoveryStatusResp ¶ added in v0.5.0
type RecoveryStatusResp struct {
StatusMessage string
}
type StatusResp ¶ added in v0.5.0
type StatusResp struct {
// A status code that matches the internal code of the Coordinator's current state.
// example: 2
StatusCode int
// A descriptive status message of what the Coordinator expects the user to do in its current state.
// example: Coordinator is ready to accept a manifest.
StatusMessage string
}
StatusResp is a response