Package server provides functions for goma servers.
ClusterName returns cluster name where server is running on.
DefaultDialOption is default dial option to record opencensus stats and traces.
func DialContext(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialContext dials to addr with default dial options.
Flush flushes opencensus data.
GC runs garbage-collector and reports latest measured resident memory size in bytes.
HostName returns hostname. in k8s, it is podname.
Init initializes opencensus instrumentations, and error reporter. If projectID is not empty, it registers stackdriver exporter for the project. It also calls SetupHTTPClient.
MemoryLimit returns server memory limit, set by cgroup.
NewHTTP creates http server.
NewLimitedSampler returns trace sampler limited by fraction and qps.
NewRemoteSampler returns trace sampler to sample if remote is sampled if remoteSampled is true. if remoteSampled is false or remote is not sampled, use sampler.
ProjectID returns current project id.
ResidentMemorySize reports latest measured resident memory size in bytes.
Run runs servers. This is typically invoked as the last statement in the server's main function.
SetupHTTPClient sets up http default client to monitor by opencensus.
GRPC represents grpc server.
NewGRPC creates grpc server listening on port.
ListenAndServe listens on Listener and handles requests with Server.
Shutdown gracefully shuts down the server.
Server is interface to control server.
NewHTTPS creates https server.
|healthz||Package healthz provides /healthz for grpc server.|