Documentation ¶
Index ¶
- Constants
- func CreateJWTToken(claims jwt.MapClaims, secret string) (string, error)
- func CurrentTime() string
- func DockerContainerInspect(containerID string) (*types.ContainerJSON, error)
- func DockerContainerReStart(containerID string) error
- func DockerContainerRemove(containerID string) error
- func DockerContainerStart(authConfig types.AuthConfig, containerName string, image string, ...) (string, error)
- func DockerContainerStop(containerID string) error
- func DockerImageAvilableCheck(image string) error
- func GetAuthStr(authConfig types.AuthConfig) string
- func GetFunctionDockerFileContent(runtime Runtime) string
- func GetUserHomeDir() string
- func IntToStr(value int) string
- func RuntimeValidate(runtime Runtime) bool
- func StrParseToPrimitive(str string) interface{}
- func StrToInt(value string) int
- type Runtime
Constants ¶
const ApigatewayImage = "quebicdocker/quebic-faas-apigateway:0.1.0"
const ApigatewayServerPort = 3000
ApigatewayServerPort apigateway server port
const ComponentAPIGateway = componentPrefix + "apigateway"
ComponentAPIGateway apigateway
const ComponentDockerRegistry = componentPrefix + "docker-registry"
ComponentDockerRegistry docker_registry
const ComponentEventBox = componentPrefix + "eventbox"
ComponentEventBox eventbox
const ComponentEventBoxDB = componentPrefix + "eventbox-db"
ComponentEventBoxDB eventbox-db
const ComponentEventBus = componentPrefix + "eventbus"
ComponentEventBus eventbus
const ComponentMgrDashboard = componentPrefix + "mgr-dashboard"
ComponentMgrDashboard mgr-dashboard
const ConsumerApigateway = "quebic-faas-apigateway"
ConsumerApigateway consumer
const ConsumerFunctionAwakePrefix = "quebic-faas-function-awake-"
ConsumerFunctionAwakePrefix quebic-faas-function-awake-
const ConsumerFunctionRequestPrefix = "quebic-faas-function-request-"
ConsumerFunctionRequestPrefix quebic-faas-function-awake-
const ConsumerMgr = "quebic-faas-mgr"
ConsumerMgr consumer
const ConsumerRequestTracker = "quebic-faas-request-tracker"
ConsumerRequestTracker consumer
const ConsumerRequestTrackerDataFetch = "quebic-faas-request-tracker-data-fetch"
ConsumerRequestTrackerDataFetch consumer data-fetch
const DefaultTimeLayout = "2006-01-02 15:04:05"
DefaultTimeLayout default time layout
const DockerFileContent_Java = "" /* 132-byte string literal not displayed */
DockerFileContent_Java java docker file
const DockerFileContent_NodeJS = "" /* 147-byte string literal not displayed */
DockerFileContent_Java java docker file
const DockerFileContent_Python_2_7 = "" /* 151-byte string literal not displayed */
DockerFileContent_Python_2_7 docker file
const DockerFileContent_Python_3_6 = "" /* 151-byte string literal not displayed */
DockerFileContent_Python_3_6 docker file
const DockerNetworkID = "quebic-faas-network"
DockerNetworkID network id in service
const DockerRegistryPort = "5000"
DockerRegistryPort docker registry port
const DockerServiceApigateway = "quebic-faas-apigateway"
DockerServiceApigateway network id in service
const DockerServiceEventBus = "quebic-faas-eventbus"
DockerServiceEventBus network id in service
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.
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
const EnvKeyHostIP = "host_ip"
EnvKeyHostIP env key
const EnvKeyMgrPORT = "mgr_port"
EnvKeyMgrPORT env key
this is env key which stored in docker image to access manager.
const EnvKey_appID = "appID"
Used by function docker service
const EnvKey_artifactLocation = "artifactLocation"
const EnvKey_eventConst_eventLogListener = "eventConst_eventLogListener"
const EnvKey_eventConst_eventPrefixFunctionAwake = "eventConst_eventPrefixFunctionAwake"
const EnvKey_eventConst_eventPrefixUserDefined = "eventConst_eventPrefixUserDefined"
const EnvKey_eventbox_uri = "EVENTBOX_URI"
const EnvKey_events = "events"
const EnvKey_functionAge = "functionAge"
const EnvKey_functionPath = "functionPath"
const EnvKey_mongo_db = "mongo.db"
const EnvKey_mongo_host = "mongo.host"
EventBox
const EnvKey_mongo_password = "mongo.password"
const EnvKey_mongo_port = "mongo.port"
const EnvKey_mongo_username = "mongo.username"
const EnvKey_rabbitmq_exchange = "rabbitmq_exchange"
const EnvKey_rabbitmq_host = "rabbitmq_host"
const EnvKey_rabbitmq_management_password = "rabbitmq_management_password"
const EnvKey_rabbitmq_management_username = "rabbitmq_management_username"
const EnvKey_rabbitmq_port = "rabbitmq_port"
const ErrorValidationFailed = "validation-failed"
const EventApigatewayDataFetch = EventPrefixInternal + EventJOIN + "apigateway-data-fetch"
EventApigatewayDataFetch used to share data between manage ans apigateway
const EventBoxDBImage = "mongo"
const EventBoxDBServerPort = 27017
EventBoxDBServerPort eventbox-db server port
const EventBoxImage = "quebicdocker/quebic-eventbox:0.1.0"
const EventBoxServerPort = 8080
EventBoxServerPort eventbox server port
const EventJOIN = "."
EventJOIN event id join
const EventPrefixExecutionACK = eventPrefix + EventJOIN + "execution-ack"
EventPrefixExecutionACK execution ack prefix
const EventPrefixFunction = EventPrefixUserDefined + EventJOIN + "function"
EventPrefixFunction function prefix
const EventPrefixFunctionAwake = eventPrefix + EventJOIN + "function-awake"
EventPrefixFunctionAwake quebic-faas-event.internal.function-awake.<function-name>
const EventPrefixInternal = eventPrefix + EventJOIN + "internal"
EventPrefixInternal execution ack prefix
const EventPrefixUserDefined = eventPrefix + EventJOIN + "defined"
EventPrefixUserDefined event id prefix
const EventRequestTracker = EventPrefixInternal + EventJOIN + "request-tracker"
EventRequestTracker used to listing apigatewat logs
const EventRequestTrackerDataFetch = EventPrefixInternal + EventJOIN + "request-tracker-data-fetch"
EventRequestTrackerDataFetch used to listing apigateways data fetch request
const EventbusImage = "rabbitmq:3.7-management-alpine"
const FilepathSeparator = string(filepath.Separator)
FilepathSeparator filepathSeparator
const FunctionLifeAwakeTypeDefault = "default"
FunctionLifeAwakeTypeDefault default
const FunctionLifeAwakeTypeRequest = "request"
FunctionLifeAwakeTypeRequest request
const FunctionLifeMinAgeMinutes = 2
FunctionLifeMinAgeMinutes minimum minutes
const FunctionLifeMinAgeSeconds = 60 * FunctionLifeMinAgeMinutes
FunctionLifeMinAgeSeconds minimum seconds
const FunctionLifeUnitHours = "hours"
FunctionLifeUnitHours hours
const FunctionLifeUnitMinutes = "minutes"
FunctionLifeUnitMinutes minutes
const FunctionLifeUnitSeconds = "seconds"
FunctionLifeUnitSeconds seconds
const FunctionSaveField_SOURCE = "source"
const FunctionSaveField_SPEC = "spec"
Request field
const HeaderAccessKey = "accesskey"
HeaderAccessKey header
const HeaderRequestID = "request-id"
HeaderRequestID header
const HostMachineIP = "0.0.0.0"
HostMachineIP host machine ip
const IngressClass = "kubernetes.io/ingress.class"
IngressClass ingress
const IngressNginx = "nginx"
IngressNginx nginx
const IngressRoutePrefix = "/api"
IngressRoutePrefix ingress route prefix
const KubeStatusFalse = "False"
KubeStatusFalse False
const KubeStatusTrue = "True"
KubeStatusTrue True
const KubeStatusUnknown = "Unknown"
KubeStatusUnknown Unknown
const LogStateComponentSetupFailed = "COMPONENT_SETUP_FAILED"
LogStateComponentSetupFailed COMPONENT_SETUP_FAILED
const LogStateDeploymentFailed = "DEPLOYMENT_FAILED"
LogStateDeploymentFailed DEPLOYMENT_FAILED
const LogStateDockerContainerRestarting = "DOCKER_CONTAINER_RESTARTING"
LogStateDockerContainerRestarting DOCKER_CONTAINER_RESTARTING
const LogStateDockerContainerStartFailed = "DOCKER_CONTAINER_START_FAILED"
LogStateDockerContainerStartFailed DOCKER_IMAGE_CREATING_FAILED
const LogStateDockerContainerStarted = "DOCKER_CONTAINER_STARTED"
LogStateDockerContainerStarted DOCKER_IMAGE_CREATED
const LogStateDockerContainerStarting = "DOCKER_CONTAINER_STARTING"
LogStateDockerContainerStarting DOCKER_CONTAINER_STARTING
const LogStateDockerContainerStoped = "DOCKER_CONTAINER_STOPED"
LogStateDockerContainerStoped DOCKER_CONTAINER_STOPED
const LogStateDockerImageCreated = "DOCKER_IMAGE_CREATED"
LogStateDockerImageCreated DOCKER_IMAGE_CREATED
const LogStateDockerImageCreating = "DOCKER_IMAGE_CREATING"
LogStateDockerImageCreating DOCKER_IMAGE_CREATING
const LogStateDockerImageCreatingFailed = "DOCKER_IMAGE_CREATING_FAILED"
LogStateDockerImageCreatingFailed DOCKER_IMAGE_CREATING_FAILED
const LogStateDockerImagePublished = "DOCKER_IMAGE_PUBLISHED"
LogStateDockerImagePublished DOCKER_IMAGE_PUBLISHED
const LogStateDockerImagePublishing = "DOCKER_IMAGE_PUBLISHING"
LogStateDockerImagePublishing DOCKER_IMAGE_PUBLISHING
const LogStateDockerImagePublishingFailed = "DOCKER_IMAGE_PUBLISHING_FAILED"
LogStateDockerImagePublishingFailed DOCKER_IMAGE_PUBLISHING_FAILED
const LogStateDockerServiceStartFailed = "DOCKER_SERVICE_START_FAILED"
LogStateDockerServiceStartFailed DOCKER_SERVICE_START_FAILED
const LogStateDockerServiceStarted = "DOCKER_SERVICE_STARTED"
LogStateDockerServiceStarted DOCKER_SERVICE_STARTED
const LogStateDockerServiceStarting = "DOCKER_SERVICE_STARTING"
LogStateDockerServiceStarting DOCKER_SERVICE_STARTING
const LogStateDockerServiceStopped = "DOCKER_SERVICE_STOPPED"
LogStateDockerServiceStopped DOCKER_SERVICE_STOPPED
const LogStateSaved = "SAVED"
LogStateSaved SAVED
const MgrDashboardImage = "quebicdocker/quebic-faas-mgr-dashboard:0.1.0"
const MgrDashboardPort = 8000
MgrDashboardPort mgr-dashboard port
const MgrServerPort = 1028
MgrServerPort mgr server port
const RabbitmqAMQPPort = 5672
RabbitmqAMQPPort rabbit
const RabbitmqManagementPassword = "guest"
RabbitmqManagementPassword rabbit
const RabbitmqManagementPort = 15672
RabbitmqManagementPort rabbit
const RabbitmqManagementUserName = "guest"
RabbitmqManagementUserName rabbit
const ResourceJOIN = ":"
ResourceJOIN resource id join
const ResourceRequestMethodDELETE = "DELETE"
ResourceRequestMethodDELETE DELETE
const ResourceRequestMethodGET = "GET"
ResourceRequestMethodGET GET
const ResourceRequestMethodPOST = "POST"
ResourceRequestMethodPOST POST
const ResourceRequestMethodPUT = "PUT"
ResourceRequestMethodPUT PUT
const RuntimeJava = "java"
RuntimeJava java
const RuntimeNodeJS = "nodejs"
RuntimeNodeJS nodejs
const RuntimePython_2_7 = "python_2.7"
RuntimePython_2_7 python 2.7
const RuntimePython_3_6 = "python_3.6"
RuntimePython_3_6 python 3_6
Variables ¶
This section is empty.
Functions ¶
func CreateJWTToken ¶
CreateJWTToken create jwt token
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
DockerContainerReStart re-start docker container by imageName
func DockerContainerRemove ¶ added in v0.1.2
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
DockerContainerStop stop docker container by containerID
func DockerImageAvilableCheck ¶ added in v0.1.2
DockerImageAvilableCheck check image is avilable on locally
func GetFunctionDockerFileContent ¶
GetFunctionDockerFileContent getFunctionDockerFileContent
func StrParseToPrimitive ¶
func StrParseToPrimitive(str string) interface{}
StrParseToPrimitive convert string to matching primitve type