common

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ApigatewayImage = "quebicdocker/quebic-faas-apigateway:0.1.0"
View Source
const ApigatewayServerPort = 3000

ApigatewayServerPort apigateway server port

View Source
const ComponentAPIGateway = componentPrefix + "apigateway"

ComponentAPIGateway apigateway

View Source
const ComponentDockerRegistry = componentPrefix + "docker-registry"

ComponentDockerRegistry docker_registry

View Source
const ComponentEventBox = componentPrefix + "eventbox"

ComponentEventBox eventbox

View Source
const ComponentEventBoxDB = componentPrefix + "eventbox-db"

ComponentEventBoxDB eventbox-db

View Source
const ComponentEventBus = componentPrefix + "eventbus"

ComponentEventBus eventbus

View Source
const ComponentMgrDashboard = componentPrefix + "mgr-dashboard"

ComponentMgrDashboard mgr-dashboard

View Source
const ConsumerApigateway = "quebic-faas-apigateway"

ConsumerApigateway consumer

View Source
const ConsumerFunctionAwakePrefix = "quebic-faas-function-awake-"

ConsumerFunctionAwakePrefix quebic-faas-function-awake-

View Source
const ConsumerFunctionRequestPrefix = "quebic-faas-function-request-"

ConsumerFunctionRequestPrefix quebic-faas-function-awake-

View Source
const ConsumerMgr = "quebic-faas-mgr"

ConsumerMgr consumer

View Source
const ConsumerRequestTracker = "quebic-faas-request-tracker"

ConsumerRequestTracker consumer

View Source
const ConsumerRequestTrackerDataFetch = "quebic-faas-request-tracker-data-fetch"

ConsumerRequestTrackerDataFetch consumer data-fetch

View Source
const DefaultTimeLayout = "2006-01-02 15:04:05"

DefaultTimeLayout default time layout

View Source
const DockerFileContent_Java = "" /* 132-byte string literal not displayed */

DockerFileContent_Java java docker file

View Source
const DockerFileContent_NodeJS = "" /* 147-byte string literal not displayed */

DockerFileContent_Java java docker file

View Source
const DockerFileContent_Python_2_7 = "" /* 151-byte string literal not displayed */

DockerFileContent_Python_2_7 docker file

View Source
const DockerFileContent_Python_3_6 = "" /* 151-byte string literal not displayed */

DockerFileContent_Python_3_6 docker file

View Source
const DockerNetworkID = "quebic-faas-network"

DockerNetworkID network id in service

View Source
const DockerRegistryPort = "5000"

DockerRegistryPort docker registry port

View Source
const DockerServiceApigateway = "quebic-faas-apigateway"

DockerServiceApigateway network id in service

View Source
const DockerServiceEventBus = "quebic-faas-eventbus"

DockerServiceEventBus network id in service

View Source
const EnvKeyAPIGateWayAccessKey = "access_key"

EnvKeyAPIGateWayAccessKey env key

this is env key which stored in docker image to access manager restricted endpoints. apigateway will make http request with the access_key.

View Source
const EnvKeyFunctionContainerSecret = "secret"

EnvKeyFunctionContainerSecret env key

this is env key which stored in docker image when creating new function. when start function container manager pass jwt encoded meta data which required to start function. this encode data open using this env key

View Source
const EnvKeyHostIP = "host_ip"

EnvKeyHostIP env key

View Source
const EnvKeyMgrPORT = "mgr_port"

EnvKeyMgrPORT env key

this is env key which stored in docker image to access manager.

View Source
const EnvKey_appID = "appID"

Used by function docker service

View Source
const EnvKey_artifactLocation = "artifactLocation"
View Source
const EnvKey_eventConst_eventLogListener = "eventConst_eventLogListener"
View Source
const EnvKey_eventConst_eventPrefixFunctionAwake = "eventConst_eventPrefixFunctionAwake"
View Source
const EnvKey_eventConst_eventPrefixUserDefined = "eventConst_eventPrefixUserDefined"
View Source
const EnvKey_eventbox_uri = "EVENTBOX_URI"
View Source
const EnvKey_events = "events"
View Source
const EnvKey_functionAge = "functionAge"
View Source
const EnvKey_functionPath = "functionPath"
View Source
const EnvKey_mongo_db = "mongo.db"
View Source
const EnvKey_mongo_host = "mongo.host"

EventBox

View Source
const EnvKey_mongo_password = "mongo.password"
View Source
const EnvKey_mongo_port = "mongo.port"
View Source
const EnvKey_mongo_username = "mongo.username"
View Source
const EnvKey_rabbitmq_exchange = "rabbitmq_exchange"
View Source
const EnvKey_rabbitmq_host = "rabbitmq_host"
View Source
const EnvKey_rabbitmq_management_password = "rabbitmq_management_password"
View Source
const EnvKey_rabbitmq_management_username = "rabbitmq_management_username"
View Source
const EnvKey_rabbitmq_port = "rabbitmq_port"
View Source
const ErrorValidationFailed = "validation-failed"
View Source
const EventApigatewayDataFetch = EventPrefixInternal + EventJOIN + "apigateway-data-fetch"

EventApigatewayDataFetch used to share data between manage ans apigateway

View Source
const EventBoxDBImage = "mongo"
View Source
const EventBoxDBServerPort = 27017

EventBoxDBServerPort eventbox-db server port

View Source
const EventBoxImage = "quebicdocker/quebic-eventbox:0.1.0"
View Source
const EventBoxServerPort = 8080

EventBoxServerPort eventbox server port

View Source
const EventJOIN = "."

EventJOIN event id join

View Source
const EventPrefixExecutionACK = eventPrefix + EventJOIN + "execution-ack"

EventPrefixExecutionACK execution ack prefix

View Source
const EventPrefixFunction = EventPrefixUserDefined + EventJOIN + "function"

EventPrefixFunction function prefix

View Source
const EventPrefixFunctionAwake = eventPrefix + EventJOIN + "function-awake"

EventPrefixFunctionAwake quebic-faas-event.internal.function-awake.<function-name>

View Source
const EventPrefixInternal = eventPrefix + EventJOIN + "internal"

EventPrefixInternal execution ack prefix

View Source
const EventPrefixUserDefined = eventPrefix + EventJOIN + "defined"

EventPrefixUserDefined event id prefix

View Source
const EventRequestTracker = EventPrefixInternal + EventJOIN + "request-tracker"

EventRequestTracker used to listing apigatewat logs

View Source
const EventRequestTrackerDataFetch = EventPrefixInternal + EventJOIN + "request-tracker-data-fetch"

EventRequestTrackerDataFetch used to listing apigateways data fetch request

View Source
const EventbusImage = "rabbitmq:3.7-management-alpine"
View Source
const FilepathSeparator = string(filepath.Separator)

FilepathSeparator filepathSeparator

View Source
const FunctionLifeAwakeTypeDefault = "default"

FunctionLifeAwakeTypeDefault default

View Source
const FunctionLifeAwakeTypeRequest = "request"

FunctionLifeAwakeTypeRequest request

View Source
const FunctionLifeMinAgeMinutes = 2

FunctionLifeMinAgeMinutes minimum minutes

View Source
const FunctionLifeMinAgeSeconds = 60 * FunctionLifeMinAgeMinutes

FunctionLifeMinAgeSeconds minimum seconds

View Source
const FunctionLifeUnitHours = "hours"

FunctionLifeUnitHours hours

View Source
const FunctionLifeUnitMinutes = "minutes"

FunctionLifeUnitMinutes minutes

View Source
const FunctionLifeUnitSeconds = "seconds"

FunctionLifeUnitSeconds seconds

View Source
const FunctionSaveField_SOURCE = "source"
View Source
const FunctionSaveField_SPEC = "spec"

Request field

View Source
const HeaderAccessKey = "accesskey"

HeaderAccessKey header

View Source
const HeaderRequestID = "request-id"

HeaderRequestID header

View Source
const HostMachineIP = "0.0.0.0"

HostMachineIP host machine ip

View Source
const IngressClass = "kubernetes.io/ingress.class"

IngressClass ingress

View Source
const IngressNginx = "nginx"

IngressNginx nginx

View Source
const IngressRoutePrefix = "/api"

IngressRoutePrefix ingress route prefix

View Source
const KubeStatusFalse = "False"

KubeStatusFalse False

View Source
const KubeStatusTrue = "True"

KubeStatusTrue True

View Source
const KubeStatusUnknown = "Unknown"

KubeStatusUnknown Unknown

View Source
const LogStateComponentSetupFailed = "COMPONENT_SETUP_FAILED"

LogStateComponentSetupFailed COMPONENT_SETUP_FAILED

View Source
const LogStateDeploymentFailed = "DEPLOYMENT_FAILED"

LogStateDeploymentFailed DEPLOYMENT_FAILED

View Source
const LogStateDockerContainerRestarting = "DOCKER_CONTAINER_RESTARTING"

LogStateDockerContainerRestarting DOCKER_CONTAINER_RESTARTING

View Source
const LogStateDockerContainerStartFailed = "DOCKER_CONTAINER_START_FAILED"

LogStateDockerContainerStartFailed DOCKER_IMAGE_CREATING_FAILED

View Source
const LogStateDockerContainerStarted = "DOCKER_CONTAINER_STARTED"

LogStateDockerContainerStarted DOCKER_IMAGE_CREATED

View Source
const LogStateDockerContainerStarting = "DOCKER_CONTAINER_STARTING"

LogStateDockerContainerStarting DOCKER_CONTAINER_STARTING

View Source
const LogStateDockerContainerStoped = "DOCKER_CONTAINER_STOPED"

LogStateDockerContainerStoped DOCKER_CONTAINER_STOPED

View Source
const LogStateDockerImageCreated = "DOCKER_IMAGE_CREATED"

LogStateDockerImageCreated DOCKER_IMAGE_CREATED

View Source
const LogStateDockerImageCreating = "DOCKER_IMAGE_CREATING"

LogStateDockerImageCreating DOCKER_IMAGE_CREATING

View Source
const LogStateDockerImageCreatingFailed = "DOCKER_IMAGE_CREATING_FAILED"

LogStateDockerImageCreatingFailed DOCKER_IMAGE_CREATING_FAILED

View Source
const LogStateDockerImagePublished = "DOCKER_IMAGE_PUBLISHED"

LogStateDockerImagePublished DOCKER_IMAGE_PUBLISHED

View Source
const LogStateDockerImagePublishing = "DOCKER_IMAGE_PUBLISHING"

LogStateDockerImagePublishing DOCKER_IMAGE_PUBLISHING

View Source
const LogStateDockerImagePublishingFailed = "DOCKER_IMAGE_PUBLISHING_FAILED"

LogStateDockerImagePublishingFailed DOCKER_IMAGE_PUBLISHING_FAILED

View Source
const LogStateDockerServiceStartFailed = "DOCKER_SERVICE_START_FAILED"

LogStateDockerServiceStartFailed DOCKER_SERVICE_START_FAILED

View Source
const LogStateDockerServiceStarted = "DOCKER_SERVICE_STARTED"

LogStateDockerServiceStarted DOCKER_SERVICE_STARTED

View Source
const LogStateDockerServiceStarting = "DOCKER_SERVICE_STARTING"

LogStateDockerServiceStarting DOCKER_SERVICE_STARTING

View Source
const LogStateDockerServiceStopped = "DOCKER_SERVICE_STOPPED"

LogStateDockerServiceStopped DOCKER_SERVICE_STOPPED

View Source
const LogStateSaved = "SAVED"

LogStateSaved SAVED

View Source
const MgrDashboardImage = "quebicdocker/quebic-faas-mgr-dashboard:0.1.0"
View Source
const MgrDashboardPort = 8000

MgrDashboardPort mgr-dashboard port

View Source
const MgrServerPort = 1028

MgrServerPort mgr server port

View Source
const RabbitmqAMQPPort = 5672

RabbitmqAMQPPort rabbit

View Source
const RabbitmqManagementPassword = "guest"

RabbitmqManagementPassword rabbit

View Source
const RabbitmqManagementPort = 15672

RabbitmqManagementPort rabbit

View Source
const RabbitmqManagementUserName = "guest"

RabbitmqManagementUserName rabbit

View Source
const ResourceJOIN = ":"

ResourceJOIN resource id join

View Source
const ResourceRequestMethodDELETE = "DELETE"

ResourceRequestMethodDELETE DELETE

View Source
const ResourceRequestMethodGET = "GET"

ResourceRequestMethodGET GET

View Source
const ResourceRequestMethodPOST = "POST"

ResourceRequestMethodPOST POST

View Source
const ResourceRequestMethodPUT = "PUT"

ResourceRequestMethodPUT PUT

View Source
const RuntimeJava = "java"

RuntimeJava java

View Source
const RuntimeNodeJS = "nodejs"

RuntimeNodeJS nodejs

View Source
const RuntimePython_2_7 = "python_2.7"

RuntimePython_2_7 python 2.7

View Source
const RuntimePython_3_6 = "python_3.6"

RuntimePython_3_6 python 3_6

Variables

This section is empty.

Functions

func CreateJWTToken

func CreateJWTToken(claims jwt.MapClaims, secret string) (string, error)

CreateJWTToken create jwt token

func CurrentTime

func CurrentTime() string

CurrentTime current time

func DockerContainerInspect added in v0.1.2

func DockerContainerInspect(containerID string) (*types.ContainerJSON, error)

DockerContainerInspect get container de

func DockerContainerReStart added in v0.1.2

func DockerContainerReStart(containerID string) error

DockerContainerReStart re-start docker container by imageName

func DockerContainerRemove added in v0.1.2

func DockerContainerRemove(containerID string) error

DockerContainerRemove remove container

func DockerContainerStart added in v0.1.2

func DockerContainerStart(
	authConfig types.AuthConfig,
	containerName string,
	image string,
	exposedPortSet nat.PortSet,
	portMap nat.PortMap,
	networkMode container.NetworkMode,
	cmd strslice.StrSlice) (string, error)

DockerContainerStart start docker container by imageName

func DockerContainerStop added in v0.1.2

func DockerContainerStop(containerID string) error

DockerContainerStop stop docker container by containerID

func DockerImageAvilableCheck added in v0.1.2

func DockerImageAvilableCheck(image string) error

DockerImageAvilableCheck check image is avilable on locally

func GetAuthStr

func GetAuthStr(authConfig types.AuthConfig) string

GetAuthStr authStr

func GetFunctionDockerFileContent

func GetFunctionDockerFileContent(runtime Runtime) string

GetFunctionDockerFileContent getFunctionDockerFileContent

func GetUserHomeDir

func GetUserHomeDir() string

GetUserHomeDir get user home dir

func IntToStr

func IntToStr(value int) string

IntToStr int to string

func RuntimeValidate

func RuntimeValidate(runtime Runtime) bool

RuntimeValidate runtime validate

func StrParseToPrimitive

func StrParseToPrimitive(str string) interface{}

StrParseToPrimitive convert string to matching primitve type

func StrToInt

func StrToInt(value string) int

StrToInt string to int

Types

type Runtime

type Runtime string

Runtime function runtime

Jump to

Keyboard shortcuts

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