grpc

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 16 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 Builder

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

Builder pattern for our gRPC service.

func New

func New(port int) *Builder

New builder.

func (*Builder) Create

func (b *Builder) Create() (*Component, error)

Create the gRPC component.

func (*Builder) WithOptions

func (b *Builder) WithOptions(oo ...grpc.ServerOption) *Builder

WithOptions allows gRPC server options to be set.

func (*Builder) WithReflection added in v0.72.0

func (b *Builder) WithReflection() *Builder

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

type Component

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

Component of a gRPC service.

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.

Jump to

Keyboard shortcuts

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