Documentation ¶
Overview ¶
Package services ...
Package services ...
Package services ...
Index ¶
- Constants
- Variables
- func CreateChildTask(sessionUserName string, parentTaskID string) (string, error)
- func CreateTask(sessionUserName string) (string, error)
- func DeleteSubscription(uuid string) (*eventsproto.EventSubResponse, error)
- func GetSessionUserName(sessionToken string) (string, error)
- func InitializeService(serviceName string) error
- func IsAuthorized(sessionToken string, privileges, oemPrivileges []string) (int32, string)
- func SubscribeToEMB(pluginID string, queueList []string)
- func UpdateTask(taskID string, taskState string, taskStatus string, percentComplete int32, ...) error
Constants ¶
const ( // AccountSession holds the name for the Account and Session micro service AccountSession = "svc.account.session" // Tasks holds the name for the Task micro service Tasks = "svc.task" // APIClient holds the name for the API client micro service APIClient = "svc.api.gateway.client" // Aggregator holds the name for the Aggregator micro service Aggregator = "svc.aggregator" // Systems holds the name for the System Micro Service Systems = "svc.systems" // Events holds the name for the Events Micro Service Events = "svc.events" // Fabrics holds the name for the Fabrics Micro Service Fabrics = "svc.fabrics" // Managers holds the name for the Managers Micro Service Managers = "svc.managers" )
Variables ¶
var Service micro.Service
Service holds the microservice instance
Functions ¶
func CreateChildTask ¶
CreateChildTask function is to contact the svc-task through the rpc call
func CreateTask ¶
CreateTask function is to contact the svc-task through the rpc call
func DeleteSubscription ¶
func DeleteSubscription(uuid string) (*eventsproto.EventSubResponse, error)
DeleteSubscription calls the event service and delete all subscription realated to that server
func GetSessionUserName ¶
GetSessionUserName will get user name from the session token by rpc call to account-session service
func InitializeService ¶
InitializeService will initialize a new micro.Service. Service will be initialized here itself, so the Server() and Client() called easily.
func IsAuthorized ¶
IsAuthorized is used to authorize the services using svc-account-session. As parameters session token, privileges and oem privileges are passed. A RPC call is made with these parameters to the Account-Session service to check whether the session is valid and have all the privileges which are passed to it. After the RPC response, the function will return status code and status message back to the caller.
func SubscribeToEMB ¶
SubscribeToEMB method will subscribe to respective event queue of the plugin
Types ¶
This section is empty.