Documentation ¶
Index ¶
- type ServiceConfigPaths
- type SysServiceConfig
- type SysServices
- func (s *SysServices) InjectInterceptors(unaryInterceptors []grpc.UnaryServerInterceptor, ...) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
- func (s *SysServices) RegisterGrpcWebServer(srv *grpc.Server) *grpcweb.WrappedGrpcServer
- func (s *SysServices) RegisterServices(srv *grpc.Server)
- func (s *SysServices) Run(hostAddr string, srv *grpcweb.WrappedGrpcServer, httpServer *http.Server, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceConfigPaths ¶
type ServiceConfigPaths struct {
// contains filtered or unexported fields
}
func NewServiceConfigPaths ¶
func NewServiceConfigPaths(accountFilePath string, accountConfig *accountpkg.SysAccountServiceConfig) *ServiceConfigPaths
type SysServiceConfig ¶
type SysServiceConfig struct {
// contains filtered or unexported fields
}
SysServiceConfig contains all the configuration for each services, because SysService needs this in order to load up and provide sub grpc services. TODO @gutterbacon : When other sys-* are built, put it on sys-share as a proxy then call it here.
type SysServices ¶
type SysServices struct { SysAccountSvc *accountpkg.SysAccountService // contains filtered or unexported fields }
SysServices will be the struct provided to the callee of this package it contains all sub grpc services contained within the `sys` repo. for example it will be: - sys-account (auth and account service) - sys-core (not sure about db) TODO @gutterbacon : When other sys-* are built, put it on sys-share as a proxy, then call it here.
func NewService ¶
func NewService(cfg *SysServiceConfig, domain string) (*SysServices, error)
NewService will create new SysServices this SysServices could be passed around to other mod-* and maintemplates-* or could be run independently using Run method below
func (*SysServices) InjectInterceptors ¶
func (s *SysServices) InjectInterceptors(unaryInterceptors []grpc.UnaryServerInterceptor, streamInterceptors []grpc.StreamServerInterceptor) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
NewServer to the supplied grpc server.
func (*SysServices) RegisterGrpcWebServer ¶
func (s *SysServices) RegisterGrpcWebServer(srv *grpc.Server) *grpcweb.WrappedGrpcServer
Creates a GrpcWeb wrapper around grpc.Server
func (*SysServices) RegisterServices ¶
func (s *SysServices) RegisterServices(srv *grpc.Server)
func (*SysServices) Run ¶
func (s *SysServices) Run(hostAddr string, srv *grpcweb.WrappedGrpcServer, httpServer *http.Server, certFile, keyFile string) error
Run is just an exported wrapper for s.run()