go-app/pkg/srv/grpc/opts/grpc_config.go

27 lines
624 B
Go
Raw Normal View History

2025-03-07 08:42:38 -05:00
package opts
import (
2025-03-07 15:19:05 -05:00
"google.golang.org/grpc"
2025-03-07 08:42:38 -05:00
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
)
type GRPCOpts struct {
*config.GRPCConfig
2025-03-07 15:19:05 -05:00
*AppGRPC
}
type AppGRPC struct {
Services []*GRPCService
UnaryInterceptors []grpc.UnaryServerInterceptor
StreamInterceptors []grpc.StreamServerInterceptor
GRPCOpts []grpc.ServerOption
GRPCDone <-chan error
}
type GRPCService struct {
Name string // Descriptive name of service
Type *grpc.ServiceDesc // Type (from protoc generated code)
Service any // Implementation of GRPCService.Type (ptr)
2025-03-07 08:42:38 -05:00
}