初始化

This commit is contained in:
2025-11-26 11:18:26 +08:00
commit 0564b8c1f3
579 changed files with 346253 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
//
// GetShipperRequest.cs
//
// Author:
// MiNG <developer@ming.gz.cn>
//
// Copyright (c) 2018 Alibaba Cloud
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using Aliyun.Api.LogService.Domain.Project;
namespace Aliyun.Api.LogService.Domain.LogStore.Shipper
{
public class GetShipperRequest : ProjectScopedRequest
{
public const Int32 DefaultOffset = 0;
public const Int32 DefaultSize = 100;
/// <summary>
/// 日志库名称,同一 Project 下唯一。
/// </summary>
public String LogstoreName { get; }
/// <summary>
/// 日志投递规则名称,同一 Logstore 下唯一。
/// </summary>
public String ShipperName { get; }
/// <summary>
/// 日志投递任务创建时间区间。
/// </summary>
public Int32 From { get; }
/// <summary>
/// 日志投递任务创建时间区间。
/// </summary>
public Int32 To { get; }
/// <summary>
/// 默认为空,表示返回所有状态的任务,目前支持 success/fail/running 等状态。
/// </summary>
public String Status { get; set; }
/// <summary>
/// 返回指定时间区间内投递任务的起始数目,默认值为 0。
/// </summary>
public Int32 Offset { get; set; } = DefaultOffset;
/// <summary>
/// 返回指定时间区间内投递任务的数目,默认值为 100最大为 500。
/// </summary>
public Int32 Size { get; set; } = DefaultSize;
public GetShipperRequest(String logstoreName, String shipperName, Int32 from, Int32 to)
{
this.LogstoreName = logstoreName;
this.ShipperName = shipperName;
this.From = from;
this.To = to;
}
}
}

View File

@@ -0,0 +1,130 @@
//
// GetShipperResult.cs
//
// Author:
// MiNG <developer@ming.gz.cn>
//
// Copyright (c) 2018 Alibaba Cloud
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
namespace Aliyun.Api.LogService.Domain.LogStore.Shipper
{
public class GetShipperResult
{
/// <summary>
/// 返回的任务个数。
/// </summary>
public Int32 Count { get; }
/// <summary>
/// 指定范围内任务总数。
/// </summary>
public Int32 Total { get; }
/// <summary>
/// 指定范围内任务汇总状态,具体请参考下表。
/// </summary>
public StatisticsResult Statistics { get; }
/// <summary>
/// 指定范围内投递任务具体详情,具体请参考下表。
/// </summary>
public IList<TasksResult> Tasks { get; }
public GetShipperResult(Int32 count, Int32 total, StatisticsResult statistics, IList<TasksResult> tasks)
{
this.Count = count;
this.Total = total;
this.Statistics = statistics;
this.Tasks = tasks;
}
public class StatisticsResult
{
/// <summary>
/// 指定范围内状态为 running 的任务个数。
/// </summary>
public Int32 Running { get; }
/// <summary>
/// 指定范围内状态为 success 的任务个数。
/// </summary>
public Int32 Success { get; }
/// <summary>
/// 指定范围内状态为 fail 的任务个数。
/// </summary>
public Int32 Fail { get; }
public StatisticsResult(Int32 running, Int32 success, Int32 fail)
{
this.Running = running;
this.Success = success;
this.Fail = fail;
}
}
public class TasksResult
{
/// <summary>
/// 具体投递任务的任务唯一 ID。
/// </summary>
public String Id { get; }
/// <summary>
/// 投递任务的具体状态,可能为 running/success/fail 中的一种。
/// </summary>
public String TaskStatus { get; }
/// <summary>
/// 投递任务失败时的具体错误信息。
/// </summary>
public String TaskMessage { get; }
/// <summary>
/// 投递任务创建时间。
/// </summary>
public Int32 TaskCreateTime { get; }
/// <summary>
/// 投递任务中的最近一条日志到达服务端时间(非日志时间,是服务端接收时间)。
/// </summary>
public Int32 TaskLastDataReceiveTime { get; }
/// <summary>
/// 投递任务结束时间。
/// </summary>
public Int32 TaskFinishTime { get; }
public TasksResult(String id, String taskStatus, String taskMessage, Int32 taskCreateTime, Int32 taskLastDataReceiveTime, Int32 taskFinishTime)
{
this.Id = id;
this.TaskStatus = taskStatus;
this.TaskMessage = taskMessage;
this.TaskCreateTime = taskCreateTime;
this.TaskLastDataReceiveTime = taskLastDataReceiveTime;
this.TaskFinishTime = taskFinishTime;
}
}
}
}

View File

@@ -0,0 +1,57 @@
//
// RetryShipperRequest.cs
//
// Author:
// MiNG <developer@ming.gz.cn>
//
// Copyright (c) 2018 Alibaba Cloud
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using Aliyun.Api.LogService.Domain.Project;
namespace Aliyun.Api.LogService.Domain.LogStore.Shipper
{
public class RetryShipperRequest : ProjectScopedRequest
{
/// <summary>
/// 日志库名称,同一 Project 下唯一。
/// </summary>
public String LogstoreName { get; }
/// <summary>
/// 日志投递规则名称,同一 Logstore 下唯一。
/// </summary>
public String ShipperName { get; }
/// <summary>
/// 需要重试的任务ID。
/// </summary>
public IEnumerable<String> TaskIds { get; }
public RetryShipperRequest(String logstoreName, String shipperName, IEnumerable<String> taskIds)
{
this.LogstoreName = logstoreName;
this.ShipperName = shipperName;
this.TaskIds = taskIds;
}
}
}