Documentation
¶
Index ¶
- Constants
- Variables
- type AppParameter
- type ApplicationItem
- type ApplicationItemsPage
- type ClusterManifest
- type ClusterManifestWrapper
- type ConfigurationEpoch
- type FabricSettings
- type InstanceItem
- type InstanceItemsPage
- type KeyValuePair
- type Metadata
- type PartitionInformation
- type PartitionItem
- type PartitionItemsPage
- type PropValue
- type PropertiesListPage
- type Property
- type ReplicaItem
- type ReplicaItemBase
- type ReplicaItemsPage
- type ServiceExtensionLabels
- type ServiceFabricClient
- func (c ServiceFabricClient) DeleteApplication(applicationId string) error
- func (c ServiceFabricClient) DeleteComposeDeployment(deploymentName string) error
- func (c ServiceFabricClient) DeleteService(serviceId string) error
- func (c ServiceFabricClient) GetApplication(appName string) (*ApplicationItem, error)
- func (c ServiceFabricClient) GetApplications() (*ApplicationItemsPage, error)
- func (c ServiceFabricClient) GetClusterHealth() (bool, error)
- func (c ServiceFabricClient) GetClusterManifest() (m ClusterManifest, err error)
- func (c ServiceFabricClient) GetDeployment(deploymentName string) (interface{}, error)
- func (c ServiceFabricClient) GetProperties(name string) (bool, map[string]string, error)
- func (c ServiceFabricClient) GetServiceExtension(appType, applicationVersion, serviceTypeName, extensionKey string, ...) error
- func (c ServiceFabricClient) GetServiceExtensionMap(service *ServiceItem, app *ApplicationItem, extensionKey string) (map[string]string, error)
- func (c ServiceFabricClient) GetServices(appName string) (*ServiceItemsPage, error)
- type ServiceItem
- type ServiceItemsPage
- type ServiceType
- type ServiceTypeDescription
Constants ¶
const DefaultAPIVersion = "6.0"
DefaultAPIVersion is a default Service Fabric REST API version
Variables ¶
var ErrResourceNotExists = errors.New("service fabric resource does not exist")
var ErrResourceNotFound = errors.New("service fabric resourcenot found")
Functions ¶
This section is empty.
Types ¶
type AppParameter ¶
AppParameter Application parameter
type ApplicationItem ¶
type ApplicationItem struct { HealthState string `json:"HealthState"` ID string `json:"Id"` Name string `json:"Name"` Parameters []*AppParameter `json:"Parameters"` Status string `json:"Status"` TypeName string `json:"TypeName"` TypeVersion string `json:"TypeVersion"` }
ApplicationItem encapsulates the embedded model for ApplicationItems within the ApplicationItemsPage model
type ApplicationItemsPage ¶
type ApplicationItemsPage struct { ContinuationToken *string `json:"ContinuationToken"` Items []ApplicationItem `json:"Items"` }
ApplicationItemsPage encapsulates the paged response model for Applications in the Service Fabric API
type ClusterManifest ¶
type ClusterManifest struct { XMLName xml.Name `xml:"ClusterManifest"` FabricSettings FabricSettings `xml:"FabricSettings"` }
type ClusterManifestWrapper ¶
type ClusterManifestWrapper struct {
Manifest string `json:"Manifest"`
}
ClusterManifest represents the cluster manifest json file
type ConfigurationEpoch ¶
type ConfigurationEpoch struct { ConfigurationVersion string `json:"ConfigurationVersion"` DataLossVersion string `json:"DataLossVersion"` }
ConfigurationEpoch Partition configuration epoch
type FabricSettings ¶
type InstanceItem ¶
type InstanceItem struct { *ReplicaItemBase ID string `json:"InstanceId"` }
InstanceItem hold instance specific data
func (*InstanceItem) GetReplicaData ¶
func (m *InstanceItem) GetReplicaData() (string, *ReplicaItemBase)
GetReplicaData returns replica data from an instance
type InstanceItemsPage ¶
type InstanceItemsPage struct { ContinuationToken *string `json:"ContinuationToken"` Items []InstanceItem `json:"Items"` }
InstanceItemsPage encapsulates the response model for Instances in the Service Fabric API
type KeyValuePair ¶
KeyValuePair represents a key value pair structure
type Metadata ¶
type Metadata struct { CustomTypeID string `json:"CustomTypeId"` LastModifiedUtcTimestamp string `json:"LastModifiedUtcTimestamp"` Parent string `json:"Parent"` SequenceNumber string `json:"SequenceNumber"` SizeInBytes int64 `json:"SizeInBytes"` TypeID string `json:"TypeId"` }
Metadata Property Metadata
type PartitionInformation ¶
type PartitionInformation struct { HighKey string `json:"HighKey"` ID string `json:"Id"` LowKey string `json:"LowKey"` ServicePartitionKind string `json:"ServicePartitionKind"` }
PartitionInformation Partition information
type PartitionItem ¶
type PartitionItem struct { CurrentConfigurationEpoch ConfigurationEpoch `json:"CurrentConfigurationEpoch"` HealthState string `json:"HealthState"` MinReplicaSetSize int64 `json:"MinReplicaSetSize"` PartitionInformation PartitionInformation `json:"PartitionInformation"` PartitionStatus string `json:"PartitionStatus"` ServiceKind string `json:"ServiceKind"` TargetReplicaSetSize int64 `json:"TargetReplicaSetSize"` }
PartitionItem encapsulates the service information returned for each PartitionItem under the service
type PartitionItemsPage ¶
type PartitionItemsPage struct { ContinuationToken *string `json:"ContinuationToken"` Items []PartitionItem `json:"Items"` }
PartitionItemsPage encapsulates the paged response model for PartitionItems in the Service Fabric API
type PropertiesListPage ¶
type PropertiesListPage struct { ContinuationToken string `json:"ContinuationToken"` IsConsistent bool `json:"IsConsistent"` Properties []Property `json:"Properties"` }
PropertiesListPage encapsulates the response model for PagedPropertyInfoList in the Service Fabric API
type Property ¶
type Property struct { Metadata Metadata `json:"Metadata"` Name string `json:"Name"` Value PropValue `json:"Value"` }
Property Paged Property Info
type ReplicaItem ¶
type ReplicaItem struct { *ReplicaItemBase ID string `json:"ReplicaId"` }
ReplicaItem holds replica specific data
func (*ReplicaItem) GetReplicaData ¶
func (m *ReplicaItem) GetReplicaData() (string, *ReplicaItemBase)
GetReplicaData returns replica data
type ReplicaItemBase ¶
type ReplicaItemBase struct { Address string `json:"Address"` HealthState string `json:"HealthState"` LastInBuildDurationInSeconds string `json:"LastInBuildDurationInSeconds"` NodeName string `json:"NodeName"` ReplicaRole string `json:"ReplicaRole"` ReplicaStatus string `json:"ReplicaStatus"` ServiceKind string `json:"ServiceKind"` }
ReplicaItemBase shared data used in both replicas and instances
type ReplicaItemsPage ¶
type ReplicaItemsPage struct { ContinuationToken *string `json:"ContinuationToken"` Items []ReplicaItem `json:"Items"` }
ReplicaItemsPage encapsulates the response model for Replicas in the Service Fabric API
type ServiceExtensionLabels ¶
type ServiceExtensionLabels struct { XMLName xml.Name `xml:"Labels"` Label []struct { XMLName xml.Name `xml:"Label"` Value string `xml:",chardata"` Key string `xml:"Key,attr"` } }
ServiceExtensionLabels provides the structure for deserialising the XML document used to store labels in an Extension
type ServiceFabricClient ¶
type ServiceFabricClient struct {
// contains filtered or unexported fields
}
Client for Service Fabric.
func NewServiceFabricClient ¶
func NewServiceFabricClient(httpClient *requests.HTTPClient, endpoint, apiVersion string) (*ServiceFabricClient, error)
func (ServiceFabricClient) DeleteApplication ¶
func (c ServiceFabricClient) DeleteApplication(applicationId string) error
func (ServiceFabricClient) DeleteComposeDeployment ¶
func (c ServiceFabricClient) DeleteComposeDeployment(deploymentName string) error
func (ServiceFabricClient) DeleteService ¶
func (c ServiceFabricClient) DeleteService(serviceId string) error
func (ServiceFabricClient) GetApplication ¶
func (c ServiceFabricClient) GetApplication(appName string) (*ApplicationItem, error)
func (ServiceFabricClient) GetApplications ¶
func (c ServiceFabricClient) GetApplications() (*ApplicationItemsPage, error)
func (ServiceFabricClient) GetClusterHealth ¶
func (c ServiceFabricClient) GetClusterHealth() (bool, error)
func (ServiceFabricClient) GetClusterManifest ¶
func (c ServiceFabricClient) GetClusterManifest() (m ClusterManifest, err error)
func (ServiceFabricClient) GetDeployment ¶
func (c ServiceFabricClient) GetDeployment(deploymentName string) (interface{}, error)
func (ServiceFabricClient) GetProperties ¶
func (ServiceFabricClient) GetServiceExtension ¶
func (c ServiceFabricClient) GetServiceExtension(appType, applicationVersion, serviceTypeName, extensionKey string, response interface{}) error
func (ServiceFabricClient) GetServiceExtensionMap ¶
func (c ServiceFabricClient) GetServiceExtensionMap(service *ServiceItem, app *ApplicationItem, extensionKey string) (map[string]string, error)
func (ServiceFabricClient) GetServices ¶
func (c ServiceFabricClient) GetServices(appName string) (*ServiceItemsPage, error)
type ServiceItem ¶
type ServiceItem struct { HasPersistedState bool `json:"HasPersistedState"` HealthState string `json:"HealthState"` ID string `json:"Id"` IsServiceGroup bool `json:"IsServiceGroup"` ManifestVersion string `json:"ManifestVersion"` Name string `json:"Name"` ServiceKind string `json:"ServiceKind"` ServiceStatus string `json:"ServiceStatus"` TypeName string `json:"TypeName"` }
ServiceItem encapsulates the embedded model for ServiceItems within the ServiceItemsPage model
type ServiceItemsPage ¶
type ServiceItemsPage struct { ContinuationToken *string `json:"ContinuationToken"` Items []ServiceItem `json:"Items"` }
ServiceItemsPage encapsulates the paged response model for Services in the Service Fabric API
type ServiceType ¶
type ServiceType struct { ServiceTypeDescription ServiceTypeDescription `json:"ServiceTypeDescription"` ServiceManifestVersion string `json:"ServiceManifestVersion"` ServiceManifestName string `json:"ServiceManifestName"` IsServiceGroup bool `json:"IsServiceGroup"` }
ServiceType encapsulates the response model for Service types in the Service Fabric API
type ServiceTypeDescription ¶
type ServiceTypeDescription struct { IsStateful bool `json:"IsStateful"` ServiceTypeName string `json:"ServiceTypeName"` PlacementConstraints string `json:"PlacementConstraints"` HasPersistedState bool `json:"HasPersistedState"` Kind string `json:"Kind"` Extensions []KeyValuePair `json:"Extensions"` LoadMetrics []interface{} `json:"LoadMetrics"` ServicePlacementPolicies []interface{} `json:"ServicePlacementPolicies"` }
ServiceTypeDescription Service Type Description