initializers

package
v0.0.0-...-72c2bb7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrClient

func AddrClient() am.AddressService

AddrClient connects to the address service

func AddrClientWithTimeout

func AddrClientWithTimeout(timeout time.Duration) am.AddressService

AddrClientWithTimeout connects to the address service with specified timeout for all calls

func BigDataClient

func BigDataClient() am.BigDataService

BigDataClient connects to the bigdata service

func BigQueryClient

func BigQueryClient(cfg *bq.ClientConfig, credentials []byte) bq.BigQuerier

func CoordClient

func CoordClient() am.CoordinatorService

CoordClient connects to the coordinator service

func DB

func DB(appConfig *AppConfig) (string, *pgx.ConnPool)

DB for environment, in region, for serviceKey service.

func DispatcherClient

func DispatcherClient() am.DispatcherService

DispatcherClient connects to the dispatcher service

func EventClient

func EventClient() am.EventService

EventClient connects to the address service

func Module

func Module(state *redis.State, moduleType am.ModuleType) am.ModuleService

Module returns the connected module depending on moduleType

func Modules

func Modules(state *redis.State) map[am.ModuleType]am.ModuleService

Modules initializes all modules and connects to them

func OrgClient

func OrgClient() am.OrganizationService

OrgClient connects to the organization service

func PortScanModule

func PortScanModule(server, token string) am.PortScannerService

PortScanModule connects directly with our port scanner service

func SGClient

func SGClient() am.ScanGroupService

SGClient connects to the scangroup service

func Self

func Self(ctx context.Context, appConfig *AppConfig)

Self registers if SelfRegister is set to anything. Assumes valid host:port pair in appConfig.Addr is set

func ServiceDiscovery

func ServiceDiscovery(appConfig *AppConfig) string

func State

func State(appConfig *AppConfig) *redis.State

State connects to the state system (redis)

func WebDataClient

func WebDataClient() am.WebDataService

WebDataClient connects to the webdata service

func WebDataClientWithTimeout

func WebDataClientWithTimeout(timeout time.Duration) am.WebDataService

WebDataClient connects to the webdata service with specified timeout for all calls

Types

type AppConfig

type AppConfig struct {
	Env          string
	Region       string
	SelfRegister string
	ServiceKey   string
	Addr         string
}

AppConfig represents values taken from environment variables

Jump to

Keyboard shortcuts

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