grpc

package module
v5.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 40 Imported by: 1

README

Tags for the buf releases:
  • git tag -s -a protoc_plugins/v4/protoc-gen-php-grpc/v
  • git git push origin protoc_plugins/v4/protoc-gen-php-grpc/v

Documentation

Index

Constants

View Source
const (
	RrMode string = "RR_MODE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthType

type ClientAuthType string
const (
	NoClientCert               ClientAuthType = "no_client_cert"
	RequestClientCert          ClientAuthType = "request_client_cert"
	RequireAnyClientCert       ClientAuthType = "require_any_client_cert"
	VerifyClientCertIfGiven    ClientAuthType = "verify_client_cert_if_given"
	RequireAndVerifyClientCert ClientAuthType = "require_and_verify_client_cert"
)

type Config

type Config struct {
	Listen string   `mapstructure:"listen"`
	Proto  []string `mapstructure:"proto"`

	TLS *TLS `mapstructure:"tls"`

	// Env is environment variables passed to the http pool
	Env map[string]string `mapstructure:"env"`

	GrpcPool              *pool.Config  `mapstructure:"pool"`
	MaxSendMsgSize        int64         `mapstructure:"max_send_msg_size"`
	MaxRecvMsgSize        int64         `mapstructure:"max_recv_msg_size"`
	MaxConnectionIdle     time.Duration `mapstructure:"max_connection_idle"`
	MaxConnectionAge      time.Duration `mapstructure:"max_connection_age"`
	MaxConnectionAgeGrace time.Duration `mapstructure:"max_connection_age_grace"`
	MaxConcurrentStreams  int64         `mapstructure:"max_concurrent_streams"`
	PingTime              time.Duration `mapstructure:"ping_time"`
	Timeout               time.Duration `mapstructure:"timeout"`
}

func (*Config) EnableTLS

func (c *Config) EnableTLS() bool

func (*Config) InitDefaults

func (c *Config) InitDefaults() error

type HealthCheckServer

type HealthCheckServer struct {
	grpc_health_v1.HealthCheckRequest
	// contains filtered or unexported fields
}

func NewHeathServer

func NewHeathServer(p *Plugin, log *zap.Logger) *HealthCheckServer

func (*HealthCheckServer) RegisterServer

func (h *HealthCheckServer) RegisterServer(serv *grpc.Server)

func (*HealthCheckServer) SetServingStatus

func (h *HealthCheckServer) SetServingStatus(servingStatus grpc_health_v1.HealthCheckResponse_ServingStatus)

func (*HealthCheckServer) Shutdown

func (h *HealthCheckServer) Shutdown()

func (*HealthCheckServer) Watch

type Informer

type Informer interface {
	Workers() []*process.State
}

Informer used to get workers from a particular plugin or set of plugins

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) AddWorker

func (p *Plugin) AddWorker() error

func (*Plugin) Collects

func (p *Plugin) Collects() []*dep.In

Collects collecting grpc interceptors

func (*Plugin) Init

func (p *Plugin) Init(cfg common.Configurer, log common.Logger, server common.Server) error

func (*Plugin) MetricsCollector

func (p *Plugin) MetricsCollector() []prometheus.Collector

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Ready

func (p *Plugin) Ready() (*status.Status, error)

Ready return readiness status of the particular plugin

func (*Plugin) RemoveWorker

func (p *Plugin) RemoveWorker(ctx context.Context) error

func (*Plugin) Reset

func (p *Plugin) Reset() error

func (*Plugin) Serve

func (p *Plugin) Serve() chan error

func (*Plugin) Status

func (p *Plugin) Status() (*status.Status, error)

Status return status of the particular plugin

func (*Plugin) Stop

func (p *Plugin) Stop(ctx context.Context) error

func (*Plugin) Workers

func (p *Plugin) Workers() []*process.State

type StatsExporter

type StatsExporter struct {
	TotalMemoryDesc  *prometheus.Desc
	StateDesc        *prometheus.Desc
	WorkerMemoryDesc *prometheus.Desc
	TotalWorkersDesc *prometheus.Desc

	WorkersReady   *prometheus.Desc
	WorkersWorking *prometheus.Desc
	WorkersInvalid *prometheus.Desc

	Workers Informer
}

func (*StatsExporter) Collect

func (s *StatsExporter) Collect(ch chan<- prometheus.Metric)

func (*StatsExporter) Describe

func (s *StatsExporter) Describe(d chan<- *prometheus.Desc)

type TLS

type TLS struct {
	Key      string         `mapstructure:"key"`
	Cert     string         `mapstructure:"cert"`
	RootCA   string         `mapstructure:"root_ca"`
	AuthType ClientAuthType `mapstructure:"client_auth_type"`
	// contains filtered or unexported fields
}

type Tracer

type Tracer interface {
	Tracer() *sdktrace.TracerProvider
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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