istio: istio.io/istio/mixer/pkg/server Index | Files

package server

import "istio.io/istio/mixer/pkg/server"

Index

Package Files

args.go interceptor.go monitoring.go server.go

func TracingServerInterceptor Uses

func TracingServerInterceptor(tracer opentracing.Tracer) grpc.UnaryServerInterceptor

TracingServerInterceptor copy of the GRPC tracing interceptor to enable switching between the supplied tracer and NoopTracer depending upon whether the request is being sampled.

type Args Uses

type Args struct {
    // The templates to register.
    Templates map[string]template.Info

    // The adapters to use
    Adapters []adapter.InfoFn

    // Maximum size of individual gRPC messages
    MaxMessageSize uint

    // Maximum number of outstanding RPCs per connection
    MaxConcurrentStreams uint

    // Maximum number of goroutines in the API worker pool
    APIWorkerPoolSize int

    // Maximum number of goroutines in the adapter worker pool
    AdapterWorkerPoolSize int

    // URL of the config store. Use k8s://path_to_kubeconfig, fs:// for file system, or mcps://<host> to
    // connect to Galley. If path_to_kubeconfig is empty, in-cluster kubeconfig is used.")
    // If this is empty (and ConfigStore isn't specified), "k8s://" will be used.
    ConfigStoreURL string

    // The certificate file locations for the MCP config backend.
    CredentialOptions *creds.Options

    // For testing; this one is used for the backend store if ConfigStoreURL is empty. Specifying both is invalid.
    ConfigStore store.Store

    // Kubernetes namespace used to store mesh-wide configuration.")
    ConfigDefaultNamespace string

    // Timeout until the initial set of configurations are received, before declaring as ready.
    ConfigWaitTimeout time.Duration

    // The logging options to use
    LoggingOptions *log.Options

    // The tracing options to use
    TracingOptions *tracing.Options

    // The path to the file which indicates the liveness of the server by its existence.
    // This will be used for k8s liveness probe. If empty, it does nothing.
    LivenessProbeOptions *probe.Options

    // The path to the file for readiness probe, similar to LivenessProbePath.
    ReadinessProbeOptions *probe.Options

    // The introspection options to use
    IntrospectionOptions *ctrlz.Options

    // Address to use for Mixer's gRPC API. This setting supercedes the API port setting.
    APIAddress string

    // Port to use for Mixer's gRPC API
    APIPort uint16

    // Port to use for exposing mixer self-monitoring information
    MonitoringPort uint16

    // Maximum number of entries in the check cache
    NumCheckCacheEntries int32

    // Enable profiling via web interface host:port/debug/pprof
    EnableProfiling bool

    // Enables gRPC-level tracing
    EnableGRPCTracing bool

    // If true, each request to Mixer will be executed in a single go routine (useful for debugging)
    SingleThreaded bool

    // Whether or not to establish watches for adapter-specific CRDs
    UseAdapterCRDs bool

    // Whether or not to establish watches for template-specific CRDs
    UseTemplateCRDs bool

    LoadSheddingOptions loadshedding.Options
}

Args contains the startup arguments to instantiate Mixer.

func DefaultArgs Uses

func DefaultArgs() *Args

DefaultArgs allocates an Args struct initialized with Mixer's default configuration.

func (*Args) String Uses

func (a *Args) String() string

String produces a stringified version of the arguments for debugging.

type Server Uses

type Server struct {
    *probe.Probe
    // contains filtered or unexported fields
}

func New Uses

func New(a *Args) (*Server, error)

New instantiates a fully functional Mixer server, ready for traffic.

func (*Server) Addr Uses

func (s *Server) Addr() net.Addr

Addr returns the address of the server's API port, where gRPC requests can be sent.

func (*Server) Close Uses

func (s *Server) Close() error

Close cleans up resources used by the server.

func (*Server) Dispatcher Uses

func (s *Server) Dispatcher() dispatcher.Dispatcher

Dispatcher returns the dispatcher that was created during server creation. This should only be used for testing purposes only.

func (*Server) Run Uses

func (s *Server) Run()

Run enables Mixer to start receiving gRPC requests on its main API port.

func (*Server) Wait Uses

func (s *Server) Wait() error

Wait waits for the server to exit.

Package server imports 42 packages (graph) and is imported by 6 packages. Updated 2019-06-12. Refresh now. Tools for package owners.