grpc

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddService added in v1.6.7

func AddService(collection *dependencyinjection.ServiceCollection, serviceCtor interface{})

Types

type ApplicationBuilder

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

func NewApplicationBuilder

func NewApplicationBuilder() *ApplicationBuilder

func (*ApplicationBuilder) AddGrpcService

func (builder *ApplicationBuilder) AddGrpcService(configure func(server *grpc.Server, ctx *ServiceContext)) *ApplicationBuilder

func (*ApplicationBuilder) AddServerOption

func (builder *ApplicationBuilder) AddServerOption(serverOption grpc.ServerOption) *ApplicationBuilder

func (*ApplicationBuilder) AddStreamServerInterceptor

func (builder *ApplicationBuilder) AddStreamServerInterceptor(interceptor ...grpc.StreamServerInterceptor) *ApplicationBuilder

func (*ApplicationBuilder) AddUnaryServerInterceptor

func (builder *ApplicationBuilder) AddUnaryServerInterceptor(interceptor ...grpc.UnaryServerInterceptor) *ApplicationBuilder

func (*ApplicationBuilder) Build

func (builder *ApplicationBuilder) Build() interface{}

func (*ApplicationBuilder) SetHostBuildContext

func (builder *ApplicationBuilder) SetHostBuildContext(context *abstractions.HostBuilderContext)

type Host

type Host struct {
	abstractions.ServiceHost
}

func NewHost

func NewHost(server abstractions.IServer, hostContext *abstractions.HostBuilderContext) Host

func (Host) Run

func (host Host) Run()

type HostBuilder

type HostBuilder struct {
	abstractions.HostBuilder
}

func NewHostBuilder

func NewHostBuilder() *HostBuilder

func (*HostBuilder) Configure added in v1.8.0

func (host *HostBuilder) Configure(configure func(*ApplicationBuilder)) *HostBuilder

func (*HostBuilder) UseConfiguration added in v1.8.0

func (host *HostBuilder) UseConfiguration(configuration abstractions.IConfiguration) *HostBuilder

type HostBuilderDecorator

type HostBuilderDecorator struct {
}

func NewHostBuilderDecorator

func NewHostBuilderDecorator() HostBuilderDecorator

func (HostBuilderDecorator) OverrideConfigure

func (h HostBuilderDecorator) OverrideConfigure(configureFunc interface{}, builder abstractions.IApplicationBuilder)

func (HostBuilderDecorator) OverrideIOCInnerConfigures

func (h HostBuilderDecorator) OverrideIOCInnerConfigures(serviceCollection *dependencyinjection.ServiceCollection)

func (HostBuilderDecorator) OverrideNewApplicationBuilder

func (h HostBuilderDecorator) OverrideNewApplicationBuilder(context *abstractions.HostBuilderContext) abstractions.IApplicationBuilder

func (HostBuilderDecorator) OverrideNewHost

type Server

type Server struct {
	IsTLS    bool
	Addr     string
	CertFile string `mapstructure:"cert" config:"cert"`
	KeyFile  string `mapstructure:"key" config:"key"`
	// contains filtered or unexported fields
}

func NewGrpcServerConfig

func NewGrpcServerConfig(config hostenv.HttpServerConfig) *Server

func (*Server) GetAddr

func (server *Server) GetAddr() string

func (*Server) Run

func (server *Server) Run(context *abstractions.HostBuilderContext) (e error)

func (*Server) Shutdown

func (server *Server) Shutdown()

type ServerBuilderContext

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

type ServiceContext

type ServiceContext struct {
	ApplicationServices dependencyinjection.IServiceProvider
	Configuration       abstractions.IConfiguration
}

func (*ServiceContext) Register added in v1.6.7

func (ctx *ServiceContext) Register(fn interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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