Categorygithub.com/tomwright/gracegrpcserverrunner
modulepackage
0.1.0
Repository: https://github.com/tomwright/gracegrpcserverrunner.git
Documentation: pkg.go.dev

# README

Go Report Card PkgGoDev GitHub License GitHub tag (latest by date)

Grace GRPC Server Runner

A GRPC Server Runner for use with grace.

Usage

package main

import (
	"context"
	"github.com/tomwright/grace"
	"github.com/tomwright/gracegrpcserverrunner"
	"google.golang.org/grpc"
)

func main() {
	g := grace.Init(context.Background())

	// Create and configure your GRPC server.
	server := grpc.NewServer()

	// Create and configure the GRPC server runner.
	runner := &gracegrpcserverrunner.GRPCServerRunner{
		Server:        server,
		ListenAddress: ":9090",
	}

	// Run the runner.
	g.Run(runner)

	g.Wait()
}

# Structs

GRPCServerRunner runs a GRPC server.