grpc

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package grpc provides a gRPC component with included observability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

Component of a gRPC service.

func New

func New(port int, options ...OptionFunction) (*Component, error)

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run the gRPC service.

func (*Component) Server

func (c *Component) Server() *grpc.Server

Server returns the gRPC sever.

type OptionFunction added in v0.74.0

type OptionFunction func(*Component) error

func WithReflection added in v0.74.0

func WithReflection() OptionFunction

WithReflection opt-in for gRPC reflection. WithReflection could be considered a security risk if services are exposed to public internet.

func WithServerOptions added in v0.74.0

func WithServerOptions(options ...grpc.ServerOption) OptionFunction

WithServerOptions allows gRPC server options to be set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳