Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions model/grpc_server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright © 2025 Prabhjot Singh Sethi, All Rights reserved
// Author: Prabhjot Singh Sethi <prabhjot.sethi@gmail.com>

package model

import (
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
)

type GrpcServerContext struct {
// GRPC server handle, over which the grpc server is hosted,
// This handle will be used by the service providers to plumb
// newly created GRPC server handlers
Server *grpc.Server

// GRPC gateway mux handle, used to register the GRPC gateway
// http handle as per the grpc gateway spec, with under neath
// Endpoint registered catching http requests on the server
Mux *runtime.ServeMux

// GRPC client handle typically to the above grpc server itself
// required by GRPC gateway to plumb between server and mux
Conn *grpc.ClientConn
}