Documentation ¶
Index ¶
- func ParseCommonCommandLineParams(params *CommonCommandLineParams)
- type CommonCommandLineParams
- type Config
- type MysqlConfig
- type NatsService
- type NatsServiceIntf
- type NatsServiceProcess
- func (serviceprocess *NatsServiceProcess) Close(timeout time.Duration) error
- func (serviceprocess *NatsServiceProcess) Logger() *log.Entry
- func (serviceprocess *NatsServiceProcess) Start(natsSvc NatsServiceIntf, params ...interface{}) *task.Task
- func (serviceprocess *NatsServiceProcess) WaitUntilAllDone()
- type NatsServiceProcessConfig
- type NatsServiceRepository
- func (nsr *NatsServiceRepository) Close(timeout time.Duration) error
- func (nsr *NatsServiceRepository) Logger() *logrus.Entry
- func (nsr *NatsServiceRepository) Name() string
- func (nsr *NatsServiceRepository) Start(ctx context.Context, natsSvc NatsServiceIntf, params ...interface{}) *task.Task
- func (nsr *NatsServiceRepository) Transport() natsevents.Transport
- type PostgresConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCommonCommandLineParams ¶ added in v0.1.16
func ParseCommonCommandLineParams(params *CommonCommandLineParams)
ParseCommonCommandLineParams sets the command line parameters, or their default values
Types ¶
type CommonCommandLineParams ¶ added in v0.1.16
CommandLineParams holds the common, non generic command line parameters
type Config ¶ added in v0.1.15
type Config struct { Servers []struct { Url string `default:"nats://nats1.plugis.com:443"` Sni bool `default:"true"` } Postgres PostgresConfig Mysql MysqlConfig CommandLineParams CommonCommandLineParams }
func LoadConfig ¶ added in v0.1.15
type MysqlConfig ¶ added in v0.1.15
type NatsService ¶
type NatsService struct { NatsServiceIntf // contains filtered or unexported fields }
func NewNatsService ¶
func NewNatsService(logger *logrus.Entry, transport natsevents.Transport) *NatsService
NewNatsService creates a nats service
func (*NatsService) SetLogger ¶
func (ns *NatsService) SetLogger(logger *logrus.Entry)
func (*NatsService) SetTransport ¶
func (ns *NatsService) SetTransport(transport natsevents.Transport)
func (*NatsService) Transport ¶
func (ns *NatsService) Transport() natsevents.Transport
implement Transporter
type NatsServiceIntf ¶
type NatsServiceIntf interface { task.Runnable logger.Logger natsevents.Transporter }
type NatsServiceProcess ¶ added in v1.1.31
type NatsServiceProcess struct {
// contains filtered or unexported fields
}
func NewServiceProcess ¶ added in v1.1.31
func NewServiceProcess(config NatsServiceProcessConfig) (*NatsServiceProcess, error)
func (*NatsServiceProcess) Close ¶ added in v1.1.31
func (serviceprocess *NatsServiceProcess) Close(timeout time.Duration) error
func (*NatsServiceProcess) Logger ¶ added in v1.1.34
func (serviceprocess *NatsServiceProcess) Logger() *log.Entry
func (*NatsServiceProcess) Start ¶ added in v1.1.31
func (serviceprocess *NatsServiceProcess) Start(natsSvc NatsServiceIntf, params ...interface{}) *task.Task
func (*NatsServiceProcess) WaitUntilAllDone ¶ added in v1.1.31
func (serviceprocess *NatsServiceProcess) WaitUntilAllDone()
type NatsServiceProcessConfig ¶ added in v1.1.31
type NatsServiceRepository ¶
type NatsServiceRepository struct { task.RunnerRepository natsevents.Transporter // contains filtered or unexported fields }
NatsServiceRepository provides logging nats cloud events transport for multiple services
func NewNatsServiceRepository ¶
func NewNatsServiceRepository(name string, natsServers string, logLevel string) (*NatsServiceRepository, error)
NewNatsServiceRepository creates a nats service repository
func (*NatsServiceRepository) Close ¶
func (nsr *NatsServiceRepository) Close(timeout time.Duration) error
Close closes flushes events on nats if timeout > 0 and closes nats connection
func (*NatsServiceRepository) Logger ¶ added in v0.1.12
func (nsr *NatsServiceRepository) Logger() *logrus.Entry
Logger returns the logger for the service repository
func (*NatsServiceRepository) Name ¶ added in v0.1.13
func (nsr *NatsServiceRepository) Name() string
Name returns the name given in NewNatsTransport
func (*NatsServiceRepository) Start ¶
func (nsr *NatsServiceRepository) Start(ctx context.Context, natsSvc NatsServiceIntf, params ...interface{}) *task.Task
Start creates a go routine and runs natsSvc Run function
func (*NatsServiceRepository) Transport ¶ added in v0.1.13
func (nsr *NatsServiceRepository) Transport() natsevents.Transport
Transport returns the transport for the service repository