ukafka

package
v0.0.0-...-acab7bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterSet

type ClusterSet struct {
	Zone string

	ClusterInstanceId string

	ClusterInstanceName string

	Framework string

	FrameworkVersion string

	Remark string

	CreateTime int

	RunningTime int
	ExpireTime  int

	AutoRenew string

	ChargeType string

	UHostCount int

	UHostSet []UHostSet

	RedundantCount int

	State string

	Tag string

	NewMessage string
	// 所在的VPC的ID
	VPCId string

	// 为 InnerMode 时,ULB 所属的子网ID,默认为空
	SubnetId string

	// 所属的业务组ID
	BusinessId string
}

type ConsumersGroups

type ConsumersGroups struct {
	GroupName string

	Type string

	NumOfTopics int
}

type DescribeUKafkaInstance

type DescribeUKafkaInstance struct {
	request.CommonBase

	ClusterInstanceId *string `required:"true"`

	Filter *string `required:"false"`
}

DescribeULBRequest is request schema for DescribeULB action

type DescribeUKafkaInstanceResponse

type DescribeUKafkaInstanceResponse struct {
	response.CommonBase

	ClusterSet []ClusterSet
}

type GetShockwaveMetricRequest

type GetShockwaveMetricRequest struct {
	request.CommonBase

	// 资源类型
	ResourceType *string `required:"true"`

	// 指标名称(不同ResourceType对应不同的MetricName)
	MetricName []string `required:"true"`

	// 资源Id(目前除sharebandwidth可以不传入ResourceId外,其他资源必须传入,sharebandwidth不传入会默认使用获取到的第一个资源Id)
	ResourceId []string `required:"true"`

	// 拉取最近多少秒的监控数据,默认1小时,即3600;最大1个月
	TimeRange *int `required:"false"`

	DistrictType *string `required:"true"`

	PublicIP []string `required:"true"`
}

GetMetricRequest is request schema for GetMetric action

type GetShockwaveMetricResponse

type GetShockwaveMetricResponse struct {
	response.CommonBase

	DataSet []MetricItemSet
}

https://api.ucloud.cn/?Region=cn-bj2&DistrictType=china&TimeRange=3600&ResourceType=eip&PublicIP.0=123.59.78.221&ResourceId.0=eip-hnvfq3&MetricName.0=InUDPPkts&MetricName.1=OutUDPPkts&Action=GetShockwaveMetric

{
  "RetCode": 0,
  "Action": "GetShockwaveMetricResponse",
  "DataSet": [
    {
      "MetricName": "InUDPPkts",
      "Granularity": 3600,
      "MetricData": [
        {
          "Timestamp": 1566208800,
          "Value": 0,
          "DistrictName": "Total",
          "IspName": "Total"
        }
      ]
    },
    {
      "MetricName": "OutUDPPkts",
      "Granularity": 3600,
      "MetricData": [
        {
          "Timestamp": 1566208800,
          "Value": 0,
          "DistrictName": "Total",
          "IspName": "Total"
        }
      ]
    }
  ]
}

GetMetricResponse is response schema for GetMetric action

type IPSet

type IPSet struct {
	IP   string
	Type string
}

type ListUKafkaConsumers

type ListUKafkaConsumers struct {
	request.CommonBase

	ClusterInstanceId *string `required:"true"`
}

DescribeULBRequest is request schema for DescribeULB action

type ListUKafkaConsumersResponse

type ListUKafkaConsumersResponse struct {
	response.CommonBase

	TotalCount int

	Groups []ConsumersGroups
}

type ListUKafkaInstance

type ListUKafkaInstance struct {
	request.CommonBase

	// 数据偏移量,默认为0
	Offset *int `required:"false"`

	// 数据分页值,默认为20
	Limit *int `required:"false"`

	ClusterInstanceId *string `required:"true"`

	Filter *string `required:"false"`
	VPCId  *string `required:"false"`

	SubnetId *string `required:"false"`

	BusinessId *string `required:"false"`
}

DescribeULBRequest is request schema for DescribeULB action

type ListUKafkaInstanceResponse

type ListUKafkaInstanceResponse struct {
	response.CommonBase

	TotalCount int

	ClusterSet []ClusterSet
}

type MetricItem

type MetricItem struct {
	Value interface{}

	Timestamp    int
	DistrictName string
	IspName      string
}

MetricItem - GetMetricInfo-监控项信息

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type MetricItemSet

type MetricItemSet struct {
	MetricName  string
	Granularity int
	MetricData  []MetricItem
}

type PartitionsInfo

type PartitionsInfo struct {
	Consumer      string
	CurrentOffset int64

	LogEndOffset int64
	Lag          int
	// contains filtered or unexported fields
}

type TopicsInfo

type TopicsInfo struct {
	TotalLag   int
	Partitions map[string]*PartitionsInfo
	//LogPer               float64
	//PartitionAssignedPer int
	LastUpdateTime int
	TopicName      string
}

type UHostConfig

type UHostConfig struct {
	BootDiskSize int
	CPU          int
	DataDiskSize int
	Memory       int
	OS           string
}

type UHostSet

type UHostSet struct {
	BrokerId          string
	UHostId           string
	ResourceId        string
	UHostRole         string
	UHostName         string
	DomainName        string
	Remark            string
	InstanceGroupType string

	UHostConfig map[string]UHostConfig

	IPSet []IPSet
	State string
}

type UKafkaClient

type UKafkaClient struct {
	*ucloud.Client
}

UMonClient is the client of UMon

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UKafkaClient

NewClient will return a instance of USocketMonClient

func (*UKafkaClient) DescribeUKafkaConsumers

func (c *UKafkaClient) DescribeUKafkaConsumers(req *UKafkaConsumers) (*UKafkaConsumersResponse, error)

func (*UKafkaClient) DescribeUKafkaInstance

func (c *UKafkaClient) DescribeUKafkaInstance(req *DescribeUKafkaInstance) (*DescribeUKafkaInstanceResponse, error)

func (*UKafkaClient) GetShockwaveMetric

GetMetric - 获取监控数据

func (*UKafkaClient) ListUKafka

func (*UKafkaClient) ListUKafkaConsumers

func (c *UKafkaClient) ListUKafkaConsumers(req *ListUKafkaConsumers) (*ListUKafkaConsumersResponse, error)

func (*UKafkaClient) NewDescribeUKafkaConsumers

func (c *UKafkaClient) NewDescribeUKafkaConsumers() *UKafkaConsumers

func (*UKafkaClient) NewDescribeUKafkaInstance

func (c *UKafkaClient) NewDescribeUKafkaInstance() *DescribeUKafkaInstance

func (*UKafkaClient) NewGetShockwaveMetric

func (c *UKafkaClient) NewGetShockwaveMetric() *GetShockwaveMetricRequest

NewGetMetricRequest will create request of GetMetric action.

func (*UKafkaClient) NewListUKafkaConsumers

func (c *UKafkaClient) NewListUKafkaConsumers() *ListUKafkaConsumers

func (*UKafkaClient) NewListUKafkaInstance

func (c *UKafkaClient) NewListUKafkaInstance() *ListUKafkaInstance

type UKafkaConsumers

type UKafkaConsumers struct {
	request.CommonBase

	ClusterInstanceId *string `required:"true"`

	ConsumerGroup *string `required:"true"`

	Type *string `required:"true"`
}

DescribeULBRequest is request schema for DescribeULB action

type UKafkaConsumersResponse

type UKafkaConsumersResponse struct {
	response.CommonBase

	GroupName string
	Type      string

	Topics []*TopicsInfo
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL