func WithHealthz() Option {
	return func(c *Config) {
		c.Plugins = append(c.Plugins, lib.NewHealthz())
	}
}
WithHealthz exposes server's health and it must be imported to enable support for client-side health checks and adds it to plugins. ref: https://godoc.org/google.golang.org/grpc/health
package config
import (
	"context"
	"github.com/autom8ter/engine/driver"
	"github.com/autom8ter/engine/lib"
	"github.com/grpc-ecosystem/go-grpc-middleware/recovery"
	"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials"
	"google.golang.org/grpc/stats"
	"time"
)
type Option func(*Config)
func WithUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) Option {
	return func(c *Config) {
		c.UnaryInterceptors = append(c.UnaryInterceptors, interceptors...)
	}
}
func WithStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) Option {
	return func(c *Config) {
		c.StreamInterceptors = append(c.StreamInterceptors, interceptors...)
	}
}
func WithPlugins(svrs ...driver.Plugin) Option {
	return func(c *Config) {
		c.Plugins = append(c.Plugins, svrs...)
		if len(c.Plugins) == 0 {
		}
	}
}
func WithCreds(creds credentials.TransportCredentials) Option {
	return func(c *Config) {
		c.Option = append(c.Option, grpc.Creds(creds))
	}
}
func WithStatsHandler(h stats.Handler) Option {
	return func(c *Config) {
		c.Option = append(c.Option, grpc.StatsHandler(h))
	}
}
func WithConnTimeout(t time.Duration) Option {
	return func(c *Config) {
		c.Option = append(c.Option, grpc.ConnectionTimeout(t))
	}
}
func WithMaxConcurrentStreams(num uint32) Option {
	return func(c *Config) {
		c.Option = append(c.Option, grpc.MaxConcurrentStreams(num))
	}
}
func WithChannelz() Option {
	return func(c *Config) {
		c.Plugins = append(c.Plugins, lib.NewChannelz())
	}
}
func WithReflection() Option {
	return func(c *Config) {
		c.Plugins = append(c.Plugins, lib.NewReflection())
	}
}