streamingplatformruntime

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 3 Imported by: 0

README

streaming-platform-runtime

Generic functions, and telemetry and runtime for streaming platform services

Example

package main

import (
	"main/services"

	httpclient "github.com/punk-link/http-client"
	"github.com/punk-link/logger"

	runtime "github.com/punk-link/streaming-platform-runtime"
	common "github.com/punk-link/streaming-platform-runtime/common"
	"github.com/punk-link/streaming-platform-runtime/startup"
)

func main() {
	logger := logger.New()
	environmentName := common.GetEnvironmentName()
	logger.LogInfo("%s is running as '%s'", "my-service", environmentName)

	serviceOptions := runtime.NewServiceOptions(logger, environmentName, SERVICE_NAME)

	myService := services.NewMyService(logger, httpclient.DefaultConfig(logger))
	go startup.ProcessUrls(serviceOptions, myService)

	startup.RunServer(serviceOptions)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceOptions

type ServiceOptions struct {
	Consul          consulClient.ConsulClient
	EnvironmentName string
	Logger          logger.Logger
	ServiceName     string
}

func NewServiceOptions

func NewServiceOptions(logger logger.Logger, appSecrets map[string]any, environmentName string, serviceName string) *ServiceOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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