Documentation
¶
Index ¶
- Constants
- func CreateJWTToken(claims jwt.MapClaims, secret string) (string, error)
- func CurrentTime() string
- 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:1.0.0"
const ApigatewayServerPort = 3000
ApigatewayServerPort apigateway server port
const ComponentAPIGateway = componentPrefix + "apigateway"
ComponentAPIGateway apigateway
const ComponentDockerRegistry = componentPrefix + "docker-registry"
ComponentDockerRegistry docker_registry
const ComponentEventBus = componentPrefix + "eventbus"
ComponentEventBus eventbus
const ConsumerApigateway = "quebic-faas-apigateway"
ConsumerApigateway consumer
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 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 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_eventPrefixUserDefined = "eventConst.eventPrefixUserDefined"
const EnvKey_events = "events"
const EnvKey_functionPath = "functionPath"
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 EventApigatewayDataFetch = EventPrefixInternal + EventJOIN + "apigateway-data-fetch"
EventApigatewayDataFetch used to share data between manage ans apigateway
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 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 FunctionSaveField_SOURCE = "source"
const FunctionSaveField_SPEC = "spec"
Request field
const HeaderAccessKey = "accesskey"
HeaderAccessKey header
const HostMachineIP = "0.0.0.0"
HostMachineIP host machine ip
const LogStateComponentSetupFailed = "COMPONENT_SETUP_FAILED"
LogStateComponentSetupFailed COMPONENT_SETUP_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 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
Variables ¶
This section is empty.
Functions ¶
func CreateJWTToken ¶
CreateJWTToken create jwt token
func GetFunctionDockerFileContent ¶
GetFunctionDockerFileContent getFunctionDockerFileContent
func StrParseToPrimitive ¶
func StrParseToPrimitive(str string) interface{}
StrParseToPrimitive convert string to matching primitve type