Documentation
¶
Index ¶
- Variables
- type OptFunc
- func WithDebug() OptFunc
- func WithHTTPPort(port uint16) OptFunc
- func WithJSONLogger() OptFunc
- func WithMaxMsgRecvSize(size int) OptFunc
- func WithMaxMsgSendSize(size int) OptFunc
- func WithMaxRequestBodySize(size int64) OptFunc
- func WithPathToCertificate(path string) OptFunc
- func WithPathToPrivateKey(path string) OptFunc
- func WithRPCPort(port uint16) OptFunc
- func WithReflection() OptFunc
- func WithServingUrlFormat(format string) OptFunc
- func WithTLS() OptFunc
- type Srv
Constants ¶
This section is empty.
Variables ¶
var ( ErrSubdomainInUse = status.Error(codes.AlreadyExists, "subdomain already in use") ErrSubdomainMissing = status.Error(codes.InvalidArgument, "missing subdomain") ErrSubdomainInvalid = status.Error(codes.InvalidArgument, "invalid subdomain") )
Functions ¶
This section is empty.
Types ¶
type OptFunc ¶
type OptFunc func(*opts)
func WithHTTPPort ¶
WithHTTPPort sets the port for the http web server. Ensure that the chosen port is available and not in use.
Default: 8080
func WithJSONLogger ¶
func WithJSONLogger() OptFunc
WithJSONLogger configures logger to use JSON.
Default: disabled
func WithMaxMsgRecvSize ¶
WithMaxMsgRecvSize sets the maximum gRPC receive message size.
Default: 1 MB (1024 * 1024)
func WithMaxMsgSendSize ¶
WithMaxMsgSendSize sets the maximum gRPC send message size.
Default: 1 MB (1024 * 1024)
func WithMaxRequestBodySize ¶
WithMaxRequestBodySize sets a limit on the size of the HTTP request body to prevent potential abuse.
Default: 1 MB (1024 * 1024)
func WithPathToCertificate ¶
WithPathToCertificate sets the path to the TLS certficiate file.
Defaullt: ./certs/srv-cert.pem
func WithPathToPrivateKey ¶
WithPathToPrivateKey sets the path to the TLS private key file.
Defaullt: ./certs/srv-key.pem
func WithRPCPort ¶
WithRPCPort sets the port for the gRPC server. Ensure that the chosen port is available and not in use.
Default: 2035
func WithReflection ¶
func WithReflection() OptFunc
WithReflection enables gRPC reflection
Default: disabled
func WithServingUrlFormat ¶
WithServingUrlFormat sets the serving url format.
Default: "http://%s.localhost:8080"
type Srv ¶
type Srv struct { pb.UnimplementedFleetServer // contains filtered or unexported fields }
Srv is the Fleet gRPC server implementation.