Documentation
¶
Index ¶
- Constants
- Variables
- func SetGlobalRetries(retries Retries)
- func SetVerbosity(verbose bool)
- func Verbose(msg string)
- type AgentConfiguration
- type AgentInfo
- type AgentListFilter
- type AgentUpdateRequest
- type ApplicationCreateResponse
- type ApplicationInfo
- type ApplicationListResponse
- type ApplicationPatchRequest
- type ApplicationRouteCreateRequest
- type ApplicationTemplate
- type ApplicationTemplateCreateRequest
- type ApplicationTemplateCreateResponse
- type ApplicationTemplateInfo
- type ApplicationTemplateListResponse
- type ApplicationTemplateMetadataUpdateRequest
- type ApplicationTemplateUpdateResponse
- type CatalogImage
- type CatalogItemCreateRequest
- type CatalogItemCreateResponse
- type CatalogItemInfo
- type CatalogItemUpdateRequest
- type CatalogListResponse
- type Client
- func (clt *Client) CreateAgent(request *CreateAgentRequest) (response CreateAgentResponse, err error)
- func (clt *Client) CreateApplicationFromYAML(file io.Reader) (*ApplicationInfo, error)
- func (clt *Client) CreateApplicationTemplateFromYAML(file io.Reader) (*ApplicationTemplate, error)
- func (clt *Client) CreateCatalogItem(request *CatalogItemCreateRequest) (*CatalogItemInfo, error)
- func (clt *Client) CreateFlow(name, description string) (*FlowInfo, error)
- func (clt *Client) CreateHTTPEdgeResource(request *EdgeResourceMetadata) error
- func (clt *Client) CreateMicroserviceFromYAML(file io.Reader) (*MicroserviceInfo, error)
- func (clt *Client) CreateMicroservicePortMapping(uuid string, portMapping *MicroservicePortMappingInfo) (err error)
- func (clt *Client) CreateMicroserviceRoute(uuid, destUUID string) (err error)
- func (clt *Client) CreateRegistry(request *RegistryCreateRequest) (int, error)
- func (clt *Client) CreateRoute(route *Route) (err error)
- func (clt *Client) CreateUser(request User) error
- func (clt *Client) DeleteAgent(uuid string) error
- func (clt *Client) DeleteApplication(name string) (err error)
- func (clt *Client) DeleteApplicationTemplate(name string) error
- func (clt *Client) DeleteCatalogItem(id int) (err error)
- func (clt *Client) DeleteEdgeResource(name, version string) error
- func (clt *Client) DeleteFlow(id int) (err error)
- func (clt *Client) DeleteMicroservice(uuid string) (err error)
- func (clt *Client) DeleteMicroservicePortMapping(uuid string, portMapping *MicroservicePortMappingInfo) (err error)
- func (clt *Client) DeleteMicroserviceRoute(uuid, destUUID string) (err error)
- func (clt *Client) DeleteRegistry(id int) (err error)
- func (clt *Client) DeleteRoute(appName, name string) (err error)
- func (clt *Client) GetAccessToken() string
- func (clt *Client) GetAgentByID(uuid string) (response *AgentInfo, err error)
- func (clt *Client) GetAgentByName(name string, system bool) (*AgentInfo, error)
- func (clt *Client) GetAgentProvisionKey(uuid string) (response GetAgentProvisionKeyResponse, err error)
- func (clt *Client) GetAllApplications() (response *ApplicationListResponse, err error)
- func (clt *Client) GetAllFlows() (response *FlowListResponse, err error)
- func (clt *Client) GetAllMicroservicePublicPorts() (response []MicroservicePublicPort, err error)
- func (clt *Client) GetAllMicroservices() (response *MicroserviceListResponse, err error)
- func (clt *Client) GetApplicationByName(name string) (application *ApplicationInfo, err error)
- func (clt *Client) GetApplicationTemplate(name string) (*ApplicationTemplate, error)
- func (clt *Client) GetBaseURL() string
- func (clt *Client) GetCatalog() (response *CatalogListResponse, err error)
- func (clt *Client) GetCatalogItem(id int) (response *CatalogItemInfo, err error)
- func (clt *Client) GetCatalogItemByName(name string) (*CatalogItemInfo, error)
- func (clt *Client) GetDefaultRouter() (router Router, err error)
- func (clt *Client) GetFlowByID(id int) (flow *FlowInfo, err error)
- func (clt *Client) GetFlowByName(name string) (_ *FlowInfo, err error)
- func (clt *Client) GetHTTPEdgeResourceByName(name, version string) (response EdgeResourceMetadata, err error)
- func (clt *Client) GetMicroserviceByID(uuid string) (response *MicroserviceInfo, err error)
- func (clt *Client) GetMicroserviceByName(appName, name string) (response *MicroserviceInfo, err error)
- func (clt *Client) GetMicroservicePortMapping(uuid string) (response *MicroservicePortMappingListResponse, err error)
- func (clt *Client) GetMicroservicesByApplication(application string) (response *MicroserviceListResponse, err error)
- func (clt *Client) GetMicroservicesPerFlow(flowID int) (response *MicroserviceListResponse, err error)
- func (clt *Client) GetRetries() Retries
- func (clt *Client) GetRoute(appName, name string) (route Route, err error)
- func (clt *Client) GetStatus() (status ControllerStatus, err error)
- func (clt *Client) GetVersion() string
- func (clt *Client) GetVersionNumbers() (major, minor, patch int, err error)
- func (clt *Client) IsApplicationTemplateCapable() error
- func (clt *Client) IsEdgeResourceCapable() error
- func (clt *Client) LinkEdgeResource(request LinkEdgeResourceRequest) error
- func (clt *Client) ListAgents(request ListAgentsRequest) (response ListAgentsResponse, err error)
- func (clt *Client) ListApplicationTemplates() (*ApplicationTemplateListResponse, error)
- func (clt *Client) ListEdgeResources() (response ListEdgeResourceResponse, err error)
- func (clt *Client) ListRegistries() (response RegistryListResponse, err error)
- func (clt *Client) ListRoutes() (response RouteListResponse, err error)
- func (clt *Client) Login(request LoginRequest) (err error)
- func (clt *Client) PatchApplication(name string, request *ApplicationPatchRequest) (*ApplicationInfo, error)
- func (clt *Client) PatchRoute(appName, name string, route *Route) (err error)
- func (clt *Client) PruneAgent(uuid string) (err error)
- func (clt *Client) PutDefaultProxy(address string) (err error)
- func (clt *Client) PutDefaultRouter(router Router) (err error)
- func (clt *Client) PutPublicPortHost(protocol Protocol, host string) (err error)
- func (clt *Client) RebootAgent(uuid string) (err error)
- func (clt *Client) RollbackAgent(name string) error
- func (clt *Client) SetAccessToken(token string)
- func (clt *Client) SetRetries(retries Retries)
- func (clt *Client) StartApplication(name string) (*ApplicationInfo, error)
- func (clt *Client) StartFlow(id int) (*FlowInfo, error)
- func (clt *Client) StopApplication(name string) (*ApplicationInfo, error)
- func (clt *Client) StopFlow(id int) (*FlowInfo, error)
- func (clt *Client) UnlinkEdgeResource(request LinkEdgeResourceRequest) error
- func (clt *Client) UpdateAgent(request *AgentUpdateRequest) (*AgentInfo, error)
- func (clt *Client) UpdateApplicationFromYAML(name string, file io.Reader) (*ApplicationInfo, error)
- func (clt *Client) UpdateApplicationTemplateFromYAML(name string, file io.Reader) (*ApplicationTemplate, error)
- func (clt *Client) UpdateApplicationTemplateMetadata(name string, newMeta *ApplicationTemplateMetadataUpdateRequest) error
- func (clt *Client) UpdateCatalogItem(request *CatalogItemUpdateRequest) (*CatalogItemInfo, error)
- func (clt *Client) UpdateFlow(request *FlowUpdateRequest) (*FlowInfo, error)
- func (clt *Client) UpdateHTTPEdgeResource(name string, request *EdgeResourceMetadata) error
- func (clt *Client) UpdateMicroserviceFromYAML(uuid string, file io.Reader) (*MicroserviceInfo, error)
- func (clt *Client) UpdateMicroserviceRoutes(uuid string, currentRoutes, newRoutes []string) (err error)
- func (clt *Client) UpdateRegistry(request RegistryUpdateRequest) error
- func (clt *Client) UpdateRoute(route *Route) (err error)
- func (clt *Client) UpdateUserPassword(request UpdateUserPasswordRequest) (err error)
- func (clt *Client) UpgradeAgent(name string) error
- type ConflictError
- type ControllerStatus
- type ControllerVersions
- type CreateAgentRequest
- type CreateAgentResponse
- type EdgeResourceDisplay
- type EdgeResourceMetadata
- type Error
- type FlowCreateRequest
- type FlowCreateResponse
- type FlowInfo
- type FlowListResponse
- type FlowUpdateRequest
- type GetAgentProvisionKeyResponse
- type HTTPEdgeResource
- type HTTPEndpoint
- type HTTPError
- type InputError
- type InternalError
- type LinkEdgeResourceRequest
- type ListAgentsRequest
- type ListAgentsResponse
- type ListEdgeResourceResponse
- type LoginRequest
- type LoginResponse
- type MicroserviceCreateResponse
- type MicroserviceEnvironmentInfo
- type MicroserviceExtraHost
- type MicroserviceInfo
- type MicroserviceListResponse
- type MicroservicePortMappingInfo
- type MicroservicePortMappingListResponse
- type MicroserviceProxyPortInfo
- type MicroservicePublicPort
- type MicroservicePublicPortInfo
- type MicroservicePublicPortRouterInfo
- type MicroserviceStatusInfo
- type MicroserviceVolumeMappingInfo
- type NotFoundError
- type NotSupportedError
- type Options
- type Protocol
- type PublicPort
- type RegistryCreateRequest
- type RegistryCreateResponse
- type RegistryInfo
- type RegistryListResponse
- type RegistryUpdateRequest
- type Retries
- type Route
- type RouteListResponse
- type Router
- type RouterConfig
- type TemplateVariable
- type UpdateConfigRequest
- type UpdateUserPasswordRequest
- type User
Constants ¶
const ( TCP = "tcp" HTTP = "http" )
const ( ControllerPort = 51121 ControllerPortString = "51121" DefaultRouterName = "default-router" )
String and numeric values of TCP ports used accross ioFog
Variables ¶
var AgentTypeAgentTypeIDDict = map[string]int{
"x86": 1,
"arm": 2,
}
AgentTypeAgentTypeIDDict Map from string agent type to numeric id
var AgentTypeIDAgentTypeDict = map[int]string{
1: "x86",
2: "arm",
}
AgentTypeIDAgentTypeDict Map from numeric id agent type to string agent type
var IsVerbose bool
IsVerbose will Toggle HTTP output
var RegistryTypeIDRegistryTypeDict = map[int]string{
1: "remote",
2: "local",
}
RegistryTypeIDRegistryTypeDict Map from numeric id registry type to string
var RegistryTypeRegistryTypeIDDict = map[string]int{
"remote": 1,
"local": 2,
}
RegistryTypeRegistryTypeIDDict Map from string registry type to numeric id
Functions ¶
func SetGlobalRetries ¶
func SetGlobalRetries(retries Retries)
func SetVerbosity ¶
func SetVerbosity(verbose bool)
Types ¶
type AgentConfiguration ¶
type AgentConfiguration struct {
DockerURL *string `json:"dockerUrl,omitempty" yaml:"dockerUrl"`
DiskLimit *int64 `json:"diskLimit,omitempty" yaml:"diskLimit"`
DiskDirectory *string `json:"diskDirectory,omitempty" yaml:"diskDirectory"`
MemoryLimit *int64 `json:"memoryLimit,omitempty" yaml:"memoryLimit"`
CPULimit *int64 `json:"cpuLimit,omitempty" yaml:"cpuLimit"`
LogLimit *int64 `json:"logLimit,omitempty" yaml:"logLimit"`
LogDirectory *string `json:"logDirectory,omitempty" yaml:"logDirectory"`
LogFileCount *int64 `json:"logFileCount,omitempty" yaml:"logFileCount"`
StatusFrequency *float64 `json:"statusFrequency,omitempty" yaml:"statusFrequency"`
ChangeFrequency *float64 `json:"changeFrequency,omitempty" yaml:"changeFrequency"`
DeviceScanFrequency *float64 `json:"deviceScanFrequency,omitempty" yaml:"deviceScanFrequency"`
BluetoothEnabled *bool `json:"bluetoothEnabled,omitempty" yaml:"bluetoothEnabled"`
WatchdogEnabled *bool `json:"watchdogEnabled,omitempty" yaml:"watchdogEnabled"`
AbstractedHardwareEnabled *bool `json:"abstractedHardwareEnabled,omitempty" yaml:"abstractedHardwareEnabled"`
IsSystem *bool `json:"isSystem,omitempty" yaml:"-"` // Can't specify system agent using yaml file.
UpstreamRouters *[]string `json:"upstreamRouters,omitempty" yaml:"upstreamRouters,omitempty"`
NetworkRouter *string `json:"networkRouter,omitempty" yaml:"networkRouter,omitempty"`
Host *string `json:"host,omitempty" yaml:"host,omitempty"`
RouterConfig `json:",omitempty" yaml:"routerConfig,omitempty"`
LogLevel *string `json:"logLevel,omitempty" yaml:"logLevel"`
DockerPruningFrequency *float64 `json:"dockerPruningFrequency,omitempty" yaml:"dockerPruningFrequency"`
AvailableDiskThreshold *float64 `json:"availableDiskThreshold,omitempty" yaml:"availableDiskThreshold"`
TimeZone string `json:"timeZone,omitempty" yaml:"timeZone"`
}
type AgentInfo ¶
type AgentInfo struct {
UUID string `json:"uuid" yaml:"uuid"`
Name string `json:"name" yaml:"name"`
Host string `json:"host" yaml:"host"`
Location string `json:"location" yaml:"location"`
Latitude float64 `json:"latitude" yaml:"latitude"`
Longitude float64 `json:"longitude" yaml:"longitude"`
Description string `json:"description" yaml:"description"`
DockerURL string `json:"dockerUrl" yaml:"dockerUrl"`
DiskLimit int64 `json:"diskLimit" yaml:"diskLimit"`
DiskDirectory string `json:"diskDirectory" yaml:"diskDirectory"`
MemoryLimit int64 `json:"memoryLimit" yaml:"memoryLimit"`
CPULimit int64 `json:"cpuLimit" yaml:"cpuLimit"`
LogLimit int64 `json:"logLimit" yaml:"logLimit"`
LogDirectory string `json:"logDirectory" yaml:"logDirectory"`
LogFileCount int64 `json:"logFileCount" yaml:"logFileCount"`
StatusFrequency float64 `json:"statusFrequency" yaml:"statusFrequency"`
ChangeFrequency float64 `json:"changeFrequency" yaml:"changeFrequency"`
DeviceScanFrequency float64 `json:"deviceScanFrequency" yaml:"deviceScanFrequency"`
BluetoothEnabled bool `json:"bluetoothEnabled" yaml:"bluetoothEnabled"`
WatchdogEnabled bool `json:"watchdogEnabled" yaml:"watchdogEnabled"`
AbstractedHardwareEnabled bool `json:"abstractedHardwareEnabled" yaml:"abstractedHardwareEnabled"`
CreatedTimeRFC3339 string `json:"createdAt" yaml:"created"`
UpdatedTimeRFC3339 string `json:"updatedAt" yaml:"updated"`
LastActive int64 `json:"lastActive" yaml:"lastActive"`
DaemonStatus string `json:"daemonStatus" yaml:"daemonStatus"`
UptimeMs int64 `json:"daemonOperatingDuration" yaml:"uptime"`
MemoryUsage float64 `json:"memoryUsage" yaml:"memoryUsage"`
DiskUsage float64 `json:"diskUsage" yaml:"diskUsage"`
CPUUsage float64 `json:"cpuUsage" yaml:"cpuUsage"`
SystemAvailableMemory float64 `json:"systemAvailableMemory" yaml:"systemAvailableMemory"`
SystemAvailableDisk float64 `json:"systemAvailableDisk" yaml:"systemAvailableDisk"`
MemoryViolation string `json:"memoryViolation" yaml:"memoryViolation"`
DiskViolation string `json:"diskViolation" yaml:"diskViolation"`
CPUViolation string `json:"cpuViolation" yaml:"cpuViolation"`
MicroserviceStatus string `json:"microserviceStatus" yaml:"microserviceStatus"`
RepositoryCount int64 `json:"repositoryCount" yaml:"repositoryCount"`
RepositoryStatus string `json:"repositoryStatus" yaml:"repositoryStatus"`
LastStatusTimeMsUTC int64 `json:"lastStatusTime" yaml:"lastStatusTime"`
IPAddress string `json:"ipAddress" yaml:"ipAddress"`
IPAddressExternal string `json:"ipAddressExternal" yaml:"ipAddressExternal"`
ProcessedMessaged int64 `json:"processedMessages" yaml:"ProcessedMessages"`
MicroserviceMessageCount int64 `json:"microserviceMessageCounts" yaml:"microserviceMessageCount"`
MessageSpeed float64 `json:"messageSpeed" yaml:"messageSpeed"`
LastCommandTimeMsUTC int64 `json:"lastCommandTime" yaml:"lastCommandTime"`
NetworkInterface string `json:"networkInterface" yaml:"networkInterface"`
Version string `json:"version" yaml:"version"`
IsReadyToUpgrade bool `json:"isReadyToUpgrade" yaml:"isReadyToUpgrade"`
IsReadyToRollback bool `json:"isReadyToRollback" yaml:"isReadyToRollback"`
Tunnel string `json:"tunnel" yaml:"tunnel"`
FogType int `json:"fogTypeId" yaml:"fogTypeId"`
RouterMode string `json:"routerMode" yaml:"routerMode"`
NetworkRouter *string `json:"networkRouter,omitempty" yaml:"networkRouter,omitempty"`
UpstreamRouters *[]string `json:"upstreamRouters,omitempty" yaml:"upstreamRouters,omitempty"`
MessagingPort *int `json:"messagingPort,omitempty" yaml:"messagingPort,omitempty"`
EdgeRouterPort *int `json:"edgeRouterPort,omitempty" yaml:"edgeRouterPort,omitempty"`
InterRouterPort *int `json:"interRouterPort,omitempty" yaml:"interRouterPort,omitempty"`
LogLevel *string `json:"logLevel" yaml:"logLevel"`
DockerPruningFrequency *float64 `json:"dockerPruningFrequency" yaml:"dockerPruningFrequency"`
AvailableDiskThreshold *float64 `json:"availableDiskThreshold" yaml:"availableDiskThreshold"`
Tags *[]string `json:"tags,omitempty" yaml:"tags,omitempty"`
TimeZone string `json:"timeZone" yaml:"timeZone"`
}
type AgentListFilter ¶
type AgentUpdateRequest ¶
type AgentUpdateRequest struct {
UUID string `json:"-"`
Name string `json:"name,omitempty" yaml:"name"`
Location string `json:"location,omitempty" yaml:"location"`
Latitude float64 `json:"latitude,omitempty" yaml:"latitude"`
Longitude float64 `json:"longitude,omitempty" yaml:"longitude"`
Description string `json:"description,omitempty" yaml:"description"`
FogType *int64 `json:"fogType,omitempty" yaml:"agentType"`
Tags *[]string `json:"tags,omitempty" yaml:"tags"`
AgentConfiguration
}
type ApplicationCreateResponse ¶
type ApplicationCreateResponse struct {
ID int `json:"id"`
}
type ApplicationInfo ¶
type ApplicationInfo struct {
Name string `json:"name"`
Description string `json:"description"`
IsActivated bool `json:"isActivated"`
IsSystem bool `json:"isSystem"`
UserID int `json:"userId"`
ID int `json:"id"`
Microservices []MicroserviceInfo `json:"microservices"`
Routes []Route `json:"routes"`
}
Applications
type ApplicationListResponse ¶
type ApplicationListResponse struct {
Applications []ApplicationInfo `json:"applications"`
}
type ApplicationPatchRequest ¶
type ApplicationTemplate ¶
type ApplicationTemplate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Variables []TemplateVariable `json:"variables,omitempty"`
Application *ApplicationTemplateInfo `json:"application,omitempty"`
}
Application Templates
type ApplicationTemplateCreateRequest ¶
type ApplicationTemplateCreateRequest = ApplicationTemplate
type ApplicationTemplateInfo ¶
type ApplicationTemplateInfo struct {
Microservices []interface{} `json:"microservices"`
Routes []interface{} `json:"routes"`
}
type ApplicationTemplateListResponse ¶
type ApplicationTemplateListResponse struct {
ApplicationTemplates []ApplicationTemplate
}
type ApplicationTemplateUpdateResponse ¶
type ApplicationTemplateUpdateResponse = ApplicationTemplateCreateResponse
type CatalogImage ¶
type CatalogItemCreateRequest ¶
type CatalogItemCreateRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Images []CatalogImage `json:"images"`
RegistryID int `json:"registryId"`
}
type CatalogItemCreateResponse ¶
type CatalogItemCreateResponse struct {
ID int `json:"id"`
}
type CatalogItemInfo ¶
type CatalogItemUpdateRequest ¶
type CatalogItemUpdateRequest struct {
ID int
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Images []CatalogImage `json:"images,omitempty"`
RegistryID int `json:"registryId,omitempty"`
}
type CatalogListResponse ¶
type CatalogListResponse struct {
CatalogItems []CatalogItemInfo `json:"catalogItems"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateAgent ¶
func (clt *Client) CreateAgent(request *CreateAgentRequest) (response CreateAgentResponse, err error)
CreateAgent creates an ioFog Agent using Controller REST API
func (*Client) CreateApplicationFromYAML ¶
func (clt *Client) CreateApplicationFromYAML(file io.Reader) (*ApplicationInfo, error)
CreateApplicationFromYAML creates a new application using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) CreateApplicationTemplateFromYAML ¶
func (clt *Client) CreateApplicationTemplateFromYAML(file io.Reader) (*ApplicationTemplate, error)
CreateApplicationTemplateFromYAML creates a new application template using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) CreateCatalogItem ¶
func (clt *Client) CreateCatalogItem(request *CatalogItemCreateRequest) (*CatalogItemInfo, error)
CreateCatalogItem creates one catalog item using Controller REST API
func (*Client) CreateFlow ¶
CreateFlow creates a new flow using the Controller REST API
func (*Client) CreateHTTPEdgeResource ¶
func (clt *Client) CreateHTTPEdgeResource(request *EdgeResourceMetadata) error
CreateHttpEdgeResource creates an Edge Resource using Controller REST API
func (*Client) CreateMicroserviceFromYAML ¶
func (clt *Client) CreateMicroserviceFromYAML(file io.Reader) (*MicroserviceInfo, error)
CreateMicroserviceFromYAML creates a new microservice using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) CreateMicroservicePortMapping ¶
func (clt *Client) CreateMicroservicePortMapping(uuid string, portMapping *MicroservicePortMappingInfo) (err error)
CreateMicroservicePortMapping creates a microservice port mapping using Controller REST API
func (*Client) CreateMicroserviceRoute ¶
CreateMicroserviceRoute creates a microservice route using Controller REST API
func (*Client) CreateRegistry ¶
func (clt *Client) CreateRegistry(request *RegistryCreateRequest) (int, error)
CreateRegistry creates a new registry using the Controller REST API
func (*Client) CreateRoute ¶
func (*Client) CreateUser ¶
func (*Client) DeleteAgent ¶
DeleteAgent removes an ioFog Agent from the Controller using Controller REST API
func (*Client) DeleteApplication ¶
DeleteApplication deletes an application using the Controller REST API
func (*Client) DeleteApplicationTemplate ¶
func (*Client) DeleteCatalogItem ¶
DeleteCatalogItem deletes one catalog item using Controller REST API
func (*Client) DeleteEdgeResource ¶
ListEdgeResources list all Edge Resources using Controller REST API
func (*Client) DeleteFlow ¶
DeleteFlow deletes a flow using the Controller REST API
func (*Client) DeleteMicroservice ¶
DeleteMicroservice deletes a microservice using Controller REST API
func (*Client) DeleteMicroservicePortMapping ¶
func (clt *Client) DeleteMicroservicePortMapping(uuid string, portMapping *MicroservicePortMappingInfo) (err error)
DeleteMicroservicePortMapping deletes a microservice port mapping using Controller REST API
func (*Client) DeleteMicroserviceRoute ¶
DeleteMicroserviceRoute deletes a microservice route using Controller REST API
func (*Client) DeleteRegistry ¶
DeleteRegistry deletes a registry using the Controller REST API
func (*Client) DeleteRoute ¶
func (*Client) GetAccessToken ¶
func (*Client) GetAgentByID ¶
GetAgentByID returns an ioFog Agent information using Controller REST API
func (*Client) GetAgentByName ¶
GetAgentByName retrieve the agent information by getting all agents then searching for the first occurance in the list
func (*Client) GetAgentProvisionKey ¶
func (clt *Client) GetAgentProvisionKey(uuid string) (response GetAgentProvisionKeyResponse, err error)
GetAgentProvisionKey get a provisioning key for an ioFog Agent using Controller REST API
func (*Client) GetAllApplications ¶
func (clt *Client) GetAllApplications() (response *ApplicationListResponse, err error)
GetAllApplications retrieve all flows information from the Controller REST API
func (*Client) GetAllFlows ¶
func (clt *Client) GetAllFlows() (response *FlowListResponse, err error)
GetAllFlows retrieve all flows information from the Controller REST API
func (*Client) GetAllMicroservicePublicPorts ¶
func (clt *Client) GetAllMicroservicePublicPorts() (response []MicroservicePublicPort, err error)
func (*Client) GetAllMicroservices ¶
func (clt *Client) GetAllMicroservices() (response *MicroserviceListResponse, err error)
func (*Client) GetApplicationByName ¶
func (clt *Client) GetApplicationByName(name string) (application *ApplicationInfo, err error)
GetApplicationByName retrieve application information using the Controller REST API
func (*Client) GetApplicationTemplate ¶
func (clt *Client) GetApplicationTemplate(name string) (*ApplicationTemplate, error)
func (*Client) GetBaseURL ¶
func (*Client) GetCatalog ¶
func (clt *Client) GetCatalog() (response *CatalogListResponse, err error)
GetCatalog retrieves all catalog items using Controller REST API
func (*Client) GetCatalogItem ¶
func (clt *Client) GetCatalogItem(id int) (response *CatalogItemInfo, err error)
GetCatalogItem retrieves one catalog item using Controller REST API
func (*Client) GetCatalogItemByName ¶
func (clt *Client) GetCatalogItemByName(name string) (*CatalogItemInfo, error)
GetCatalogItemByName returns a catalog item by listing all catalog items and returning the first occurence of the specified name
func (*Client) GetDefaultRouter ¶
func (*Client) GetFlowByID ¶
GetFlowByID retrieve flow information using the Controller REST API
func (*Client) GetFlowByName ¶
GetFlowByName retrieve the flow information by getting all flows then searching for the first occurance in the list
func (*Client) GetHTTPEdgeResourceByName ¶
func (clt *Client) GetHTTPEdgeResourceByName(name, version string) (response EdgeResourceMetadata, err error)
GetHttpEdgeResourceByName gets an Edge Resource using Controller REST API
func (*Client) GetMicroserviceByID ¶
func (clt *Client) GetMicroserviceByID(uuid string) (response *MicroserviceInfo, err error)
GetMicroserviceByID retrieves a microservice information using Controller REST API
func (*Client) GetMicroserviceByName ¶
func (clt *Client) GetMicroserviceByName(appName, name string) (response *MicroserviceInfo, err error)
GetMicroserviceByName retrieves a microservice information using Controller REST API
func (*Client) GetMicroservicePortMapping ¶
func (clt *Client) GetMicroservicePortMapping(uuid string) (response *MicroservicePortMappingListResponse, err error)
GetMicroservicePortMapping retrieves a microservice port mappings using Controller REST API
func (*Client) GetMicroservicesByApplication ¶
func (clt *Client) GetMicroservicesByApplication(application string) (response *MicroserviceListResponse, err error)
GetMicroservicesByApplication returns a list of microservices in a specific application using Controller REST API
func (*Client) GetMicroservicesPerFlow ¶
func (clt *Client) GetMicroservicesPerFlow(flowID int) (response *MicroserviceListResponse, err error)
GetMicroservicesPerFlow (DEPRECATED) returns a list of microservices in a specific flow using Controller REST API
func (*Client) GetRetries ¶
func (*Client) GetStatus ¶
func (clt *Client) GetStatus() (status ControllerStatus, err error)
func (*Client) GetVersion ¶
func (*Client) GetVersionNumbers ¶
func (*Client) IsApplicationTemplateCapable ¶
func (*Client) IsEdgeResourceCapable ¶
func (*Client) LinkEdgeResource ¶
func (clt *Client) LinkEdgeResource(request LinkEdgeResourceRequest) error
LinkEdgeResource links an Edge Resource to an Agent using Controller REST API
func (*Client) ListAgents ¶
func (clt *Client) ListAgents(request ListAgentsRequest) (response ListAgentsResponse, err error)
ListAgents returns all ioFog Agents information using Controller REST API
func (*Client) ListApplicationTemplates ¶
func (clt *Client) ListApplicationTemplates() (*ApplicationTemplateListResponse, error)
func (*Client) ListEdgeResources ¶
func (clt *Client) ListEdgeResources() (response ListEdgeResourceResponse, err error)
ListEdgeResources list all Edge Resources using Controller REST API
func (*Client) ListRegistries ¶
func (clt *Client) ListRegistries() (response RegistryListResponse, err error)
ListRegistries retrieve all registries information from the Controller REST API
func (*Client) ListRoutes ¶
func (clt *Client) ListRoutes() (response RouteListResponse, err error)
func (*Client) Login ¶
func (clt *Client) Login(request LoginRequest) (err error)
func (*Client) PatchApplication ¶
func (clt *Client) PatchApplication(name string, request *ApplicationPatchRequest) (*ApplicationInfo, error)
UpdateApplication patches an application using the Controller REST API
func (*Client) PatchRoute ¶
func (*Client) PruneAgent ¶
PruneAgent prunes an ioFog Agent using Controller REST API
func (*Client) PutDefaultProxy ¶
func (*Client) PutDefaultRouter ¶
func (*Client) PutPublicPortHost ¶
func (*Client) RebootAgent ¶
RebootAgent reboots an ioFog Agent using Controller REST API
func (*Client) RollbackAgent ¶
func (*Client) SetAccessToken ¶
func (*Client) SetRetries ¶
func (*Client) StartApplication ¶
func (clt *Client) StartApplication(name string) (*ApplicationInfo, error)
StartApplication set the application as active using the Controller REST API
func (*Client) StopApplication ¶
func (clt *Client) StopApplication(name string) (*ApplicationInfo, error)
StopApplication set the application as inactive using the Controller REST API
func (*Client) UnlinkEdgeResource ¶
func (clt *Client) UnlinkEdgeResource(request LinkEdgeResourceRequest) error
UnlinkEdgeResource unlinks an Edge Resource from an Agent using Controller REST API
func (*Client) UpdateAgent ¶
func (clt *Client) UpdateAgent(request *AgentUpdateRequest) (*AgentInfo, error)
UpdateAgent patches an ioFog Agent using Controller REST API
func (*Client) UpdateApplicationFromYAML ¶
UpdateApplicationFromYAML updates an application using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) UpdateApplicationTemplateFromYAML ¶
func (clt *Client) UpdateApplicationTemplateFromYAML(name string, file io.Reader) (*ApplicationTemplate, error)
UpdateApplicationTemplateFromYAML updates an application template using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) UpdateApplicationTemplateMetadata ¶
func (clt *Client) UpdateApplicationTemplateMetadata(name string, newMeta *ApplicationTemplateMetadataUpdateRequest) error
func (*Client) UpdateCatalogItem ¶
func (clt *Client) UpdateCatalogItem(request *CatalogItemUpdateRequest) (*CatalogItemInfo, error)
UpdateCatalogItem updates one catalog item using Controller REST API
func (*Client) UpdateFlow ¶
func (clt *Client) UpdateFlow(request *FlowUpdateRequest) (*FlowInfo, error)
UpdateFlow patches a flow using the Controller REST API
func (*Client) UpdateHTTPEdgeResource ¶
func (clt *Client) UpdateHTTPEdgeResource(name string, request *EdgeResourceMetadata) error
UpdateHttpEdgeResource updates an HTTP Based Edge Resources using Controller REST API
func (*Client) UpdateMicroserviceFromYAML ¶
func (clt *Client) UpdateMicroserviceFromYAML(uuid string, file io.Reader) (*MicroserviceInfo, error)
UpdateMicroserviceFromYAML updates a microservice using the Controller REST API It sends the yaml file to Controller REST API
func (*Client) UpdateMicroserviceRoutes ¶
func (*Client) UpdateRegistry ¶
func (clt *Client) UpdateRegistry(request RegistryUpdateRequest) error
UpdateRegistry patches a registry using the Controller REST API
func (*Client) UpdateRoute ¶
func (*Client) UpdateUserPassword ¶
func (clt *Client) UpdateUserPassword(request UpdateUserPasswordRequest) (err error)
func (*Client) UpgradeAgent ¶
type ConflictError ¶
type ConflictError struct {
// contains filtered or unexported fields
}
ConflictError export
func NewConflictError ¶
func NewConflictError(msg string) (err *ConflictError)
NewConflictError export
type ControllerStatus ¶
type ControllerStatus struct {
Status string `json:"status"`
UptimeSeconds float64 `json:"uptimeSec"`
Versions ControllerVersions `json:"versions"`
}
type ControllerVersions ¶
type CreateAgentRequest ¶
type CreateAgentRequest struct {
AgentUpdateRequest `json:",inline"`
}
type CreateAgentResponse ¶
type CreateAgentResponse struct {
UUID string
}
type EdgeResourceDisplay ¶
type EdgeResourceMetadata ¶
type EdgeResourceMetadata struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
InterfaceProtocol string `json:"interfaceProtocol,omitempty"`
Display *EdgeResourceDisplay `json:"display,omitempty"`
Interface HTTPEdgeResource `json:"interface,omitempty"` // TODO: Make this generic
OrchestrationTags []string `json:"orchestrationTags,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
}
type FlowCreateRequest ¶
type FlowCreateResponse ¶
type FlowInfo ¶
type FlowInfo struct {
Name string `json:"name"`
Description string `json:"description"`
IsActivated bool `json:"isActivated"`
IsSystem bool `json:"isSystem"`
UserID int `json:"userId"`
ID int `json:"id"`
}
Flows - Keep for legacy
type FlowListResponse ¶
type FlowListResponse struct {
Flows []FlowInfo `json:"flows"`
}
type FlowUpdateRequest ¶
type HTTPEdgeResource ¶
type HTTPEdgeResource struct {
Endpoints []HTTPEndpoint `json:"endpoints,omitempty"`
}
type HTTPEndpoint ¶
type HTTPError ¶
type HTTPError struct {
Code int
// contains filtered or unexported fields
}
HTTPError export
func NewHTTPError ¶
NewHTTPError export
type InputError ¶
type InputError struct {
// contains filtered or unexported fields
}
InputError export
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
InternalError export
func NewInternalError ¶
func NewInternalError(message string) (err *InternalError)
NewInternalError export
type LinkEdgeResourceRequest ¶
type ListAgentsRequest ¶
type ListAgentsRequest struct {
System bool `json:"system"`
Filters []AgentListFilter `json:"filters"`
}
type ListAgentsResponse ¶
type ListAgentsResponse struct {
Agents []AgentInfo `json:"fogs"`
}
type ListEdgeResourceResponse ¶
type ListEdgeResourceResponse struct {
EdgeResources []EdgeResourceMetadata `json:"edgeResources"`
}
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
AccessToken string `json:"accessToken"`
}
type MicroserviceCreateResponse ¶
type MicroserviceCreateResponse struct {
UUID string `json:"uuid"`
}
type MicroserviceExtraHost ¶
type MicroserviceInfo ¶
type MicroserviceInfo struct {
UUID string `json:"uuid"`
Config string `json:"config"`
Name string `json:"name"`
RootHostAccess bool `json:"rootHostAccess"`
LogSize int `json:"logSize"`
Delete bool `json:"delete"`
DeleteWithCleanup bool `json:"deleteWithCleanup"`
FlowID int `json:"flowId"`
ApplicationID int `json:"applicationID"`
Application string `json:"application"`
CatalogItemID int `json:"catalogItemId"`
AgentUUID string `json:"iofogUuid"`
UserID int `json:"userId"`
RegistryID int `json:"registryId"`
Ports []MicroservicePortMappingInfo `json:"ports"`
Volumes []MicroserviceVolumeMappingInfo `json:"volumeMappings"`
Commands []string `json:"cmd"`
Env []MicroserviceEnvironmentInfo `json:"env"`
ExtraHosts []MicroserviceExtraHost `json:"extraHosts"`
Status MicroserviceStatusInfo `json:"status"`
Images []CatalogImage `json:"images"`
}
type MicroserviceListResponse ¶
type MicroserviceListResponse struct {
Microservices []MicroserviceInfo
}
type MicroservicePortMappingInfo ¶
type MicroservicePortMappingInfo struct {
Internal int64 `json:"internal"`
External int64 `json:"external"`
Public *MicroservicePublicPortInfo `json:"public,omitempty"`
Proxy *MicroserviceProxyPortInfo `json:"proxy,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
type MicroservicePortMappingListResponse ¶
type MicroservicePortMappingListResponse struct {
PortMappings []MicroservicePortMappingInfo `json:"ports"`
}
type MicroserviceProxyPortInfo ¶ added in v3.1.0
type MicroservicePublicPort ¶
type MicroservicePublicPort struct {
MicroserviceUUID string `json:"microserviceUuid"`
PublicPort PublicPort `json:"publicPort"`
}
type MicroservicePublicPortInfo ¶
type MicroservicePublicPortInfo struct {
Schemes []string `json:"schemes"`
Links []string `json:"links"`
Protocol string `json:"protocol"`
Enabled bool `json:"enabled"`
Router *MicroservicePublicPortRouterInfo `json:"router,omitempty"`
}
type MicroserviceStatusInfo ¶
type MicroserviceStatusInfo struct {
Status string `json:"status"`
StartTime int64 `json:"startTime"`
OperatingDuration int64 `json:"operatingDuration"`
MemoryUsage float64 `json:"memoryUsage"`
CPUUsage float64 `json:"cpuUsage"`
ContainerID string `json:"containerId"`
Percentage float64 `json:"percentage"`
ErrorMessage string `json:"errorMessage"`
}
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError export
func NewNotFoundError ¶
func NewNotFoundError(msg string) (err *NotFoundError)
NewNotFoundError export
type NotSupportedError ¶
type NotSupportedError struct {
// contains filtered or unexported fields
}
NotSupported export
func NewNotSupportedError ¶
func NewNotSupportedError(capability string) (err *NotSupportedError)
NewNotSupported export
type PublicPort ¶
type RegistryCreateRequest ¶
type RegistryCreateResponse ¶
type RegistryCreateResponse struct {
ID int `json:"id"`
}
type RegistryInfo ¶
type RegistryInfo struct {
ID int `json:"id"`
URL string `json:"url"`
IsPublic bool `json:"isPublic"`
IsSecure bool `json:"isSecure"`
Certificate string `json:"certificate"`
RequiresCert bool `json:"requiresCert"`
Username string `json:"username"`
Email string `json:"userEmail"`
}
Registries
type RegistryListResponse ¶
type RegistryListResponse struct {
Registries []RegistryInfo `json:"registries"`
}
type RegistryUpdateRequest ¶
type RegistryUpdateRequest struct {
URL *string `json:"url,omitempty"`
IsPublic *bool `json:"isPublic,omitempty"`
Certificate *string `json:"certificate,omitempty"`
RequiresCert *bool `json:"requiresCert,omitempty"`
Username *string `json:"username,omitempty"`
Email *string `json:"email,omitempty"`
Password *string `json:"password,omitempty"`
ID int `json:"-"`
}
type Route ¶
type Route struct {
Name string `json:"name"`
Application string `json:"application"`
SourceMicroserviceUUID string `json:"sourceMicroserviceUuid,omitempty"`
DestMicroserviceUUID string `json:"destMicroserviceUuid,omitempty"`
From string `json:"from"`
To string `json:"to"`
}
Route still has deprecated Dest/SourceUUID for retro compatibility Prefer From and To
type RouteListResponse ¶
type RouteListResponse struct {
Routes []Route `json:"routes"`
}
type Router ¶
type Router struct {
RouterConfig
Host string `json:"host"`
}
type RouterConfig ¶
type RouterConfig struct {
RouterMode *string `json:"routerMode,omitempty" yaml:"routerMode,omitempty"`
MessagingPort *int `json:"messagingPort,omitempty" yaml:"messagingPort,omitempty"`
EdgeRouterPort *int `json:"edgeRouterPort,omitempty" yaml:"edgeRouterPort,omitempty"`
InterRouterPort *int `json:"interRouterPort,omitempty" yaml:"interRouterPort,omitempty"`
}