service_diff

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiDiff

type ApiDiff struct {
	APi      string     `json:"api,omitempty"`
	Upstream string     `json:"upstream,omitempty"`
	Name     string     `json:"name,omitempty"`
	Method   string     `json:"method,omitempty"`
	Path     string     `json:"path,omitempty"`
	Change   ChangeType `json:"change,omitempty"`
	Status   Status     `json:"status,omitempty"`
}

type ChangeType

type ChangeType int
const (
	ChangeTypeNone ChangeType = iota
	ChangeTypeNew
	ChangeTypeUpdate
	ChangeTypeDelete
)

func ParseChangeType

func ParseChangeType(s string) ChangeType

func (*ChangeType) Label

func (c *ChangeType) Label() string

func (*ChangeType) MarshalJSON

func (c *ChangeType) MarshalJSON() ([]byte, error)

func (*ChangeType) String

func (c *ChangeType) String() string

func (*ChangeType) UnmarshalJSON

func (c *ChangeType) UnmarshalJSON(bytes []byte) error

type Diff

type Diff struct {
	Clusters  []string        `json:"clusters,omitempty"`
	Apis      []*ApiDiff      `json:"apis"`
	Upstreams []*UpstreamDiff `json:"upstreams"`
}

type Status

type Status struct {
	Proxy StatusType `json:"proxy_status,omitempty"`
	Doc   StatusType `json:"doc_status,omitempty"`
}

type StatusType

type StatusType int
const (
	StatusOK    StatusType = iota
	StatusUnset            // 未设置
	StatusLoss
)

type UpstreamConfig

type UpstreamConfig struct {
	Addr []string `json:"addr"`
}

type UpstreamDiff

type UpstreamDiff struct {
	Upstream string `json:"upstream,omitempty" `
	//Partition string           `json:"partition,omitempty"`
	Data   *upstream.Config `json:"data,omitempty"`
	Change ChangeType       `json:"change,omitempty"`
	Status StatusType       `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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