pkg

package
v0.0.0-...-ff5c026 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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.

func NewSysServiceConfig

func NewSysServiceConfig(l logging.Logger, db *coredb.CoreDB, servicePaths *ServiceConfigPaths, port int, bus *corebus.CoreBus) (*SysServiceConfig, error)

TODO @gutterbacon: this function is a stub, we need to load up config from somewhere later.

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()

Jump to

Keyboard shortcuts

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