vendor: update all dependencies to latest versions
This commit is contained in:
+3
-5
@@ -1,5 +1,4 @@
|
||||
// Package servicemap implements the Azure ARM Servicemap service API version
|
||||
// 2015-11-01-preview.
|
||||
// Package servicemap implements the Azure ARM Servicemap service API version 2015-11-01-preview.
|
||||
//
|
||||
// Service Map API Reference
|
||||
package servicemap
|
||||
@@ -18,9 +17,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
+63
-31
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -36,21 +35,17 @@ func NewClientGroupsClient(subscriptionID string) ClientGroupsClient {
|
||||
return NewClientGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewClientGroupsClientWithBaseURI creates an instance of the
|
||||
// ClientGroupsClient client.
|
||||
// NewClientGroupsClientWithBaseURI creates an instance of the ClientGroupsClient client.
|
||||
func NewClientGroupsClientWithBaseURI(baseURI string, subscriptionID string) ClientGroupsClient {
|
||||
return ClientGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieves the specified client group
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. clientGroupName is client Group resource name. startTime is uTC
|
||||
// date and time specifying the start time of an interval. When not specified
|
||||
// the service uses DateTime.UtcNow - 10m endTime is uTC date and time
|
||||
// specifying the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client ClientGroupsClient) Get(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result ClientGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -135,16 +130,12 @@ func (client ClientGroupsClient) GetResponder(resp *http.Response) (result Clien
|
||||
return
|
||||
}
|
||||
|
||||
// GetMembersCount returns the approximate number of members in the client
|
||||
// group.
|
||||
// GetMembersCount returns the approximate number of members in the client group.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. clientGroupName is client Group resource name. startTime is uTC
|
||||
// date and time specifying the start time of an interval. When not specified
|
||||
// the service uses DateTime.UtcNow - 10m endTime is uTC date and time
|
||||
// specifying the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client ClientGroupsClient) GetMembersCount(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result ClientGroupMembersCount, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -229,17 +220,13 @@ func (client ClientGroupsClient) GetMembersCountResponder(resp *http.Response) (
|
||||
return
|
||||
}
|
||||
|
||||
// ListMembers returns the members of the client group during the specified
|
||||
// time interval.
|
||||
// ListMembers returns the members of the client group during the specified time interval.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. clientGroupName is client Group resource name. startTime is uTC
|
||||
// date and time specifying the start time of an interval. When not specified
|
||||
// the service uses DateTime.UtcNow - 10m endTime is uTC date and time
|
||||
// specifying the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow top is page size to use. When not specified, the default
|
||||
// page size is 100 records.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow top is
|
||||
// page size to use. When not specified, the default page size is 100 records.
|
||||
func (client ClientGroupsClient) ListMembers(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32) (result ClientGroupMembersCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -355,3 +342,48 @@ func (client ClientGroupsClient) ListMembersNextResults(lastResults ClientGroupM
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListMembersComplete gets all elements from the list without paging.
|
||||
func (client ClientGroupsClient) ListMembersComplete(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32, cancel <-chan struct{}) (<-chan ClientGroupMember, <-chan error) {
|
||||
resultChan := make(chan ClientGroupMember)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListMembers(resourceGroupName, workspaceName, clientGroupName, startTime, endTime, top)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListMembersNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+60
-23
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -30,23 +29,20 @@ type MachineGroupsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewMachineGroupsClient creates an instance of the MachineGroupsClient
|
||||
// client.
|
||||
// NewMachineGroupsClient creates an instance of the MachineGroupsClient client.
|
||||
func NewMachineGroupsClient(subscriptionID string) MachineGroupsClient {
|
||||
return NewMachineGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewMachineGroupsClientWithBaseURI creates an instance of the
|
||||
// MachineGroupsClient client.
|
||||
// NewMachineGroupsClientWithBaseURI creates an instance of the MachineGroupsClient client.
|
||||
func NewMachineGroupsClientWithBaseURI(baseURI string, subscriptionID string) MachineGroupsClient {
|
||||
return MachineGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a new machine group.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineGroup is machine Group resource to create.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineGroup is machine Group resource to create.
|
||||
func (client MachineGroupsClient) Create(resourceGroupName string, workspaceName string, machineGroup MachineGroup) (result MachineGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -132,9 +128,8 @@ func (client MachineGroupsClient) CreateResponder(resp *http.Response) (result M
|
||||
|
||||
// Delete deletes the specified Machine Group.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineGroupName is machine Group resource name.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineGroupName is machine Group resource name.
|
||||
func (client MachineGroupsClient) Delete(resourceGroupName string, workspaceName string, machineGroupName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -214,9 +209,8 @@ func (client MachineGroupsClient) DeleteResponder(resp *http.Response) (result a
|
||||
|
||||
// Get returns the specified machine group.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineGroupName is machine Group resource name.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineGroupName is machine Group resource name.
|
||||
func (client MachineGroupsClient) Get(resourceGroupName string, workspaceName string, machineGroupName string) (result MachineGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -297,9 +291,8 @@ func (client MachineGroupsClient) GetResponder(resp *http.Response) (result Mach
|
||||
|
||||
// ListByWorkspace returns all machine groups.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest.
|
||||
func (client MachineGroupsClient) ListByWorkspace(resourceGroupName string, workspaceName string) (result MachineGroupCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -398,12 +391,56 @@ func (client MachineGroupsClient) ListByWorkspaceNextResults(lastResults Machine
|
||||
return
|
||||
}
|
||||
|
||||
// ListByWorkspaceComplete gets all elements from the list without paging.
|
||||
func (client MachineGroupsClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, cancel <-chan struct{}) (<-chan MachineGroup, <-chan error) {
|
||||
resultChan := make(chan MachineGroup)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByWorkspace(resourceGroupName, workspaceName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByWorkspaceNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update updates a machine group.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineGroupName is machine Group resource name. machineGroup is
|
||||
// machine Group resource to update.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineGroupName is machine Group resource name. machineGroup is machine Group
|
||||
// resource to update.
|
||||
func (client MachineGroupsClient) Update(resourceGroupName string, workspaceName string, machineGroupName string, machineGroup MachineGroup) (result MachineGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+278
-85
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -36,19 +35,17 @@ func NewMachinesClient(subscriptionID string) MachinesClient {
|
||||
return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewMachinesClientWithBaseURI creates an instance of the MachinesClient
|
||||
// client.
|
||||
// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client.
|
||||
func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string) MachinesClient {
|
||||
return MachinesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get returns the specified machine.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. timestamp is uTC date and
|
||||
// time specifying a time instance relative to which to evaluate the machine
|
||||
// resource. When not specified, the service uses DateTime.UtcNow.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. timestamp is UTC date and time
|
||||
// specifying a time instance relative to which to evaluate the machine resource. When not specified, the service uses
|
||||
// DateTime.UtcNow.
|
||||
func (client MachinesClient) Get(resourceGroupName string, workspaceName string, machineName string, timestamp *date.Time) (result Machine, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -130,16 +127,12 @@ func (client MachinesClient) GetResponder(resp *http.Response) (result Machine,
|
||||
return
|
||||
}
|
||||
|
||||
// GetLiveness obtains the liveness status of the machine during the specified
|
||||
// time interval.
|
||||
// GetLiveness obtains the liveness status of the machine during the specified time interval.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. startTime is uTC date and
|
||||
// time specifying the start time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying
|
||||
// the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client MachinesClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -224,29 +217,21 @@ func (client MachinesClient) GetLivenessResponder(resp *http.Response) (result L
|
||||
return
|
||||
}
|
||||
|
||||
// ListByWorkspace returns a collection of machines matching the specified
|
||||
// conditions. The returned collection represents either machines that are
|
||||
// active/live during the specified interval of time (`live=true` and
|
||||
// `startTime`/`endTime` are specified) or that are known to have existed at or
|
||||
// some time prior to the specified point in time (`live=false` and `timestamp`
|
||||
// is specified).
|
||||
// ListByWorkspace returns a collection of machines matching the specified conditions. The returned collection
|
||||
// represents either machines that are active/live during the specified interval of time (`live=true` and
|
||||
// `startTime`/`endTime` are specified) or that are known to have existed at or some time prior to the specified point
|
||||
// in time (`live=false` and `timestamp` is specified).
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. live is specifies whether to return live resources (true) or
|
||||
// inventory resources (false). Defaults to **true**. When retrieving live
|
||||
// resources, the start time (`startTime`) and end time (`endTime`) of the
|
||||
// desired interval should be included. When retrieving inventory resources, an
|
||||
// optional timestamp (`timestamp`) parameter can be specified to return the
|
||||
// version of each resource closest (not-after) that timestamp. startTime is
|
||||
// uTC date and time specifying the start time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow - 10m endTime is uTC date and
|
||||
// time specifying the end time of an interval. When not specified the service
|
||||
// uses DateTime.UtcNow timestamp is uTC date and time specifying a time
|
||||
// instance relative to which to evaluate each machine resource. Only applies
|
||||
// when `live=false`. When not specified, the service uses DateTime.UtcNow. top
|
||||
// is page size to use. When not specified, the default page size is 100
|
||||
// records.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. live is specifies whether to return live resources (true) or inventory
|
||||
// resources (false). Defaults to **true**. When retrieving live resources, the start time (`startTime`) and end time
|
||||
// (`endTime`) of the desired interval should be included. When retrieving inventory resources, an optional timestamp
|
||||
// (`timestamp`) parameter can be specified to return the version of each resource closest (not-after) that timestamp.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow timestamp is UTC date and time specifying a time instance relative to which to evaluate
|
||||
// each machine resource. Only applies when `live=false`. When not specified, the service uses DateTime.UtcNow. top is
|
||||
// page size to use. When not specified, the default page size is 100 records.
|
||||
func (client MachinesClient) ListByWorkspace(resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32) (result MachineCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -365,16 +350,57 @@ func (client MachinesClient) ListByWorkspaceNextResults(lastResults MachineColle
|
||||
return
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections terminating or
|
||||
// originating at the specified machine
|
||||
// ListByWorkspaceComplete gets all elements from the list without paging.
|
||||
func (client MachinesClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32, cancel <-chan struct{}) (<-chan Machine, <-chan error) {
|
||||
resultChan := make(chan Machine)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByWorkspace(resourceGroupName, workspaceName, live, startTime, endTime, timestamp, top)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByWorkspaceNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections terminating or originating at the specified machine
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. startTime is uTC date and
|
||||
// time specifying the start time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying
|
||||
// the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client MachinesClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -483,12 +509,55 @@ func (client MachinesClient) ListConnectionsNextResults(lastResults ConnectionCo
|
||||
return
|
||||
}
|
||||
|
||||
// ListMachineGroupMembership returns a collection of machine groups this
|
||||
// machine belongs to.
|
||||
// ListConnectionsComplete gets all elements from the list without paging.
|
||||
func (client MachinesClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) {
|
||||
resultChan := make(chan Connection)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListConnectionsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListMachineGroupMembership returns a collection of machine groups this machine belongs to.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name.
|
||||
func (client MachinesClient) ListMachineGroupMembership(resourceGroupName string, workspaceName string, machineName string) (result MachineGroupCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -591,16 +660,57 @@ func (client MachinesClient) ListMachineGroupMembershipNextResults(lastResults M
|
||||
return
|
||||
}
|
||||
|
||||
// ListPorts returns a collection of live ports on the specified machine during
|
||||
// the specified time interval.
|
||||
// ListMachineGroupMembershipComplete gets all elements from the list without paging.
|
||||
func (client MachinesClient) ListMachineGroupMembershipComplete(resourceGroupName string, workspaceName string, machineName string, cancel <-chan struct{}) (<-chan MachineGroup, <-chan error) {
|
||||
resultChan := make(chan MachineGroup)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListMachineGroupMembership(resourceGroupName, workspaceName, machineName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListMachineGroupMembershipNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListPorts returns a collection of live ports on the specified machine during the specified time interval.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. startTime is uTC date and
|
||||
// time specifying the start time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying
|
||||
// the end time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time
|
||||
// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC
|
||||
// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client MachinesClient) ListPorts(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result PortCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -709,28 +819,66 @@ func (client MachinesClient) ListPortsNextResults(lastResults PortCollection) (r
|
||||
return
|
||||
}
|
||||
|
||||
// ListProcesses returns a collection of processes on the specified machine
|
||||
// matching the specified conditions. The returned collection represents either
|
||||
// processes that are active/live during the specified interval of time
|
||||
// (`live=true` and `startTime`/`endTime` are specified) or that are known to
|
||||
// have existed at or some time prior to the specified point in time
|
||||
// (`live=false` and `timestamp` is specified).
|
||||
// ListPortsComplete gets all elements from the list without paging.
|
||||
func (client MachinesClient) ListPortsComplete(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Port, <-chan error) {
|
||||
resultChan := make(chan Port)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListPorts(resourceGroupName, workspaceName, machineName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListPortsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListProcesses returns a collection of processes on the specified machine matching the specified conditions. The
|
||||
// returned collection represents either processes that are active/live during the specified interval of time
|
||||
// (`live=true` and `startTime`/`endTime` are specified) or that are known to have existed at or some time prior to
|
||||
// the specified point in time (`live=false` and `timestamp` is specified).
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. live is specifies whether to
|
||||
// return live resources (true) or inventory resources (false). Defaults to
|
||||
// **true**. When retrieving live resources, the start time (`startTime`) and
|
||||
// end time (`endTime`) of the desired interval should be included. When
|
||||
// retrieving inventory resources, an optional timestamp (`timestamp`)
|
||||
// parameter can be specified to return the version of each resource closest
|
||||
// (not-after) that timestamp. startTime is uTC date and time specifying the
|
||||
// start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is uTC date and time specifying the end time
|
||||
// of an interval. When not specified the service uses DateTime.UtcNow
|
||||
// timestamp is uTC date and time specifying a time instance relative to which
|
||||
// to evaluate all process resource. Only applies when `live=false`. When not
|
||||
// specified, the service uses DateTime.UtcNow.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. live is specifies whether to return live
|
||||
// resources (true) or inventory resources (false). Defaults to **true**. When retrieving live resources, the start
|
||||
// time (`startTime`) and end time (`endTime`) of the desired interval should be included. When retrieving inventory
|
||||
// resources, an optional timestamp (`timestamp`) parameter can be specified to return the version of each resource
|
||||
// closest (not-after) that timestamp. startTime is UTC date and time specifying the start time of an interval. When
|
||||
// not specified the service uses DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow timestamp is UTC date and time specifying a time
|
||||
// instance relative to which to evaluate all process resource. Only applies when `live=false`. When not specified, the
|
||||
// service uses DateTime.UtcNow.
|
||||
func (client MachinesClient) ListProcesses(resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time) (result ProcessCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -844,3 +992,48 @@ func (client MachinesClient) ListProcessesNextResults(lastResults ProcessCollect
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListProcessesComplete gets all elements from the list without paging.
|
||||
func (client MachinesClient) ListProcessesComplete(resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, cancel <-chan struct{}) (<-chan Process, <-chan error) {
|
||||
resultChan := make(chan Process)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListProcesses(resourceGroupName, workspaceName, machineName, live, startTime, endTime, timestamp)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListProcessesNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+4
-6
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -42,9 +41,8 @@ func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient
|
||||
|
||||
// Generate generates the specified map.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. request is request options.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. request is request options.
|
||||
func (client MapsClient) Generate(resourceGroupName string, workspaceName string, request MapRequest) (result MapResponse, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+1073
-157
File diff suppressed because it is too large
Load Diff
+117
-40
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -41,17 +40,14 @@ func NewPortsClientWithBaseURI(baseURI string, subscriptionID string) PortsClien
|
||||
return PortsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get returns the specified port. The port must be live during the specified
|
||||
// time interval. If the port is not live during the interval, status 404 (Not
|
||||
// Found) is returned.
|
||||
// Get returns the specified port. The port must be live during the specified time interval. If the port is not live
|
||||
// during the interval, status 404 (Not Found) is returned.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. portName is port resource
|
||||
// name. startTime is uTC date and time specifying the start time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow - 10m endTime
|
||||
// is uTC date and time specifying the end time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. portName is port resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client PortsClient) Get(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result Port, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -140,16 +136,13 @@ func (client PortsClient) GetResponder(resp *http.Response) (result Port, err er
|
||||
return
|
||||
}
|
||||
|
||||
// GetLiveness obtains the liveness status of the port during the specified
|
||||
// time interval.
|
||||
// GetLiveness obtains the liveness status of the port during the specified time interval.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. portName is port resource
|
||||
// name. startTime is uTC date and time specifying the start time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow - 10m endTime
|
||||
// is uTC date and time specifying the end time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. portName is port resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client PortsClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -238,16 +231,13 @@ func (client PortsClient) GetLivenessResponder(resp *http.Response) (result Live
|
||||
return
|
||||
}
|
||||
|
||||
// ListAcceptingProcesses returns a collection of processes accepting on the
|
||||
// specified port
|
||||
// ListAcceptingProcesses returns a collection of processes accepting on the specified port
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. portName is port resource
|
||||
// name. startTime is uTC date and time specifying the start time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow - 10m endTime
|
||||
// is uTC date and time specifying the end time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. portName is port resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client PortsClient) ListAcceptingProcesses(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result ProcessCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -360,16 +350,58 @@ func (client PortsClient) ListAcceptingProcessesNextResults(lastResults ProcessC
|
||||
return
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections established via the
|
||||
// specified port.
|
||||
// ListAcceptingProcessesComplete gets all elements from the list without paging.
|
||||
func (client PortsClient) ListAcceptingProcessesComplete(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Process, <-chan error) {
|
||||
resultChan := make(chan Process)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListAcceptingProcesses(resourceGroupName, workspaceName, machineName, portName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListAcceptingProcessesNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections established via the specified port.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. portName is port resource
|
||||
// name. startTime is uTC date and time specifying the start time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow - 10m endTime
|
||||
// is uTC date and time specifying the end time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. portName is port resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client PortsClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -481,3 +513,48 @@ func (client PortsClient) ListConnectionsNextResults(lastResults ConnectionColle
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListConnectionsComplete gets all elements from the list without paging.
|
||||
func (client PortsClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) {
|
||||
resultChan := make(chan Connection)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, portName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListConnectionsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+115
-38
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -36,20 +35,17 @@ func NewProcessesClient(subscriptionID string) ProcessesClient {
|
||||
return NewProcessesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient
|
||||
// client.
|
||||
// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient client.
|
||||
func NewProcessesClientWithBaseURI(baseURI string, subscriptionID string) ProcessesClient {
|
||||
return ProcessesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get returns the specified process.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. processName is process
|
||||
// resource name. timestamp is uTC date and time specifying a time instance
|
||||
// relative to which to evaluate a resource. When not specified, the service
|
||||
// uses DateTime.UtcNow.
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. processName is process resource name.
|
||||
// timestamp is UTC date and time specifying a time instance relative to which to evaluate a resource. When not
|
||||
// specified, the service uses DateTime.UtcNow.
|
||||
func (client ProcessesClient) Get(resourceGroupName string, workspaceName string, machineName string, processName string, timestamp *date.Time) (result Process, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -135,16 +131,13 @@ func (client ProcessesClient) GetResponder(resp *http.Response) (result Process,
|
||||
return
|
||||
}
|
||||
|
||||
// GetLiveness obtains the liveness status of the process during the specified
|
||||
// time interval.
|
||||
// GetLiveness obtains the liveness status of the process during the specified time interval.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. processName is process
|
||||
// resource name. startTime is uTC date and time specifying the start time of
|
||||
// an interval. When not specified the service uses DateTime.UtcNow - 10m
|
||||
// endTime is uTC date and time specifying the end time of an interval. When
|
||||
// not specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. processName is process resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client ProcessesClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -233,16 +226,13 @@ func (client ProcessesClient) GetLivenessResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// ListAcceptingPorts returns a collection of ports on which this process is
|
||||
// accepting
|
||||
// ListAcceptingPorts returns a collection of ports on which this process is accepting
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. processName is process
|
||||
// resource name. startTime is uTC date and time specifying the start time of
|
||||
// an interval. When not specified the service uses DateTime.UtcNow - 10m
|
||||
// endTime is uTC date and time specifying the end time of an interval. When
|
||||
// not specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. processName is process resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client ProcessesClient) ListAcceptingPorts(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result PortCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -355,16 +345,58 @@ func (client ProcessesClient) ListAcceptingPortsNextResults(lastResults PortColl
|
||||
return
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections terminating or
|
||||
// originating at the specified process
|
||||
// ListAcceptingPortsComplete gets all elements from the list without paging.
|
||||
func (client ProcessesClient) ListAcceptingPortsComplete(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Port, <-chan error) {
|
||||
resultChan := make(chan Port)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListAcceptingPorts(resourceGroupName, workspaceName, machineName, processName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListAcceptingPortsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListConnections returns a collection of connections terminating or originating at the specified process
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. machineName is machine resource name. processName is process
|
||||
// resource name. startTime is uTC date and time specifying the start time of
|
||||
// an interval. When not specified the service uses DateTime.UtcNow - 10m
|
||||
// endTime is uTC date and time specifying the end time of an interval. When
|
||||
// not specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. machineName is machine resource name. processName is process resource name.
|
||||
// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses
|
||||
// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the
|
||||
// service uses DateTime.UtcNow
|
||||
func (client ProcessesClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -476,3 +508,48 @@ func (client ProcessesClient) ListConnectionsNextResults(lastResults ConnectionC
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListConnectionsComplete gets all elements from the list without paging.
|
||||
func (client ProcessesClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) {
|
||||
resultChan := make(chan Connection)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, processName, startTime, endTime)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListConnectionsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+7
-11
@@ -14,9 +14,8 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -36,20 +35,17 @@ func NewSummariesClient(subscriptionID string) SummariesClient {
|
||||
return NewSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewSummariesClientWithBaseURI creates an instance of the SummariesClient
|
||||
// client.
|
||||
// NewSummariesClientWithBaseURI creates an instance of the SummariesClient client.
|
||||
func NewSummariesClientWithBaseURI(baseURI string, subscriptionID string) SummariesClient {
|
||||
return SummariesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// GetMachines returns summary information about the machines in the workspace.
|
||||
//
|
||||
// resourceGroupName is resource group name within the specified
|
||||
// subscriptionId. workspaceName is oMS workspace containing the resources of
|
||||
// interest. startTime is uTC date and time specifying the start time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow - 10m endTime
|
||||
// is uTC date and time specifying the end time of an interval. When not
|
||||
// specified the service uses DateTime.UtcNow
|
||||
// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace
|
||||
// containing the resources of interest. startTime is UTC date and time specifying the start time of an interval. When
|
||||
// not specified the service uses DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an
|
||||
// interval. When not specified the service uses DateTime.UtcNow
|
||||
func (client SummariesClient) GetMachines(resourceGroupName string, workspaceName string, startTime *date.Time, endTime *date.Time) (result MachinesSummary, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package servicemap
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-servicemap/2015-11-01-preview"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-servicemap/2015-11-01-preview"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user