types

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalDNSRule

type ExternalDNSRule struct {
	Name             string
	Ports            ProtoPorts
	SyncWholeNetwork bool
}

func (*ExternalDNSRule) Equals

func (t *ExternalDNSRule) Equals(other *ExternalDNSRule) bool

type ExternalIPRule

type ExternalIPRule struct {
	IP               string
	Ports            ProtoPorts
	SyncWholeNetwork bool
}

func (*ExternalIPRule) Equals

func (t *ExternalIPRule) Equals(other *ExternalIPRule) bool

type KubernetesServiceRule

type KubernetesServiceRule struct {
	Namespace   string
	ServiceName string
	ClusterName string
}

type ProtoPort

type ProtoPort struct {
	Protocol string
	Port     uint16
}

func (ProtoPort) String

func (p ProtoPort) String() string

type ProtoPorts

type ProtoPorts []ProtoPort

func (ProtoPorts) Equals

func (p ProtoPorts) Equals(other ProtoPorts) bool

type RpaasInstanceRule

type RpaasInstanceRule struct {
	ServiceName string
	Instance    string
}

func (*RpaasInstanceRule) String

func (r *RpaasInstanceRule) String() string

type Rule

type Rule struct {
	RuleID      string
	RuleName    string
	Source      RuleType
	Destination RuleType
	Removed     bool
	Metadata    map[string]string
	Created     time.Time
	Creator     string
}

func (*Rule) String

func (r *Rule) String() string

type RuleSyncData

type RuleSyncData struct {
	StartTime  time.Time
	EndTime    time.Time
	Successful bool
	Removed    bool
	Error      string
	SyncResult string
}

type RuleSyncInfo

type RuleSyncInfo struct {
	SyncID    string
	RuleID    string
	Engine    string
	StartTime time.Time
	EndTime   time.Time
	PingTime  time.Time
	Running   bool
	Syncs     []RuleSyncData
}

func (RuleSyncInfo) LatestSync

func (rsi RuleSyncInfo) LatestSync() *RuleSyncData

type RuleType

type RuleType struct {
	TsuruApp          *TsuruAppRule          `json:"TsuruApp,omitempty"`
	TsuruJob          *TsuruJobRule          `json:"TsuruJob,omitempty"`
	KubernetesService *KubernetesServiceRule `json:"KubernetesService,omitempty"`
	ExternalDNS       *ExternalDNSRule       `json:"ExternalDNS,omitempty"`
	ExternalIP        *ExternalIPRule        `json:"ExternalIP,omitempty"`
	RpaasInstance     *RpaasInstanceRule     `json:"RpaasInstance,omitempty"`
}

func (*RuleType) CacheKey

func (rt *RuleType) CacheKey() (string, error)

func (*RuleType) Equals

func (r *RuleType) Equals(other *RuleType) bool

func (*RuleType) String

func (rt *RuleType) String() string

func (*RuleType) Validate

func (r *RuleType) Validate() error

type ServiceInstance

type ServiceInstance struct {
	InstanceName string
	Creator      string
	EventID      string
	BindApps     []string
	BindJobs     []string
	BaseRules    []ServiceRule
}

type ServiceRule

type ServiceRule struct {
	Rule
	Creator string
	EventID string
}

func (*ServiceRule) Equals

func (s *ServiceRule) Equals(other *ServiceRule) bool

type TsuruAppRule

type TsuruAppRule struct {
	AppName  string
	PoolName string
}

type TsuruJobRule added in v0.1.2

type TsuruJobRule struct {
	JobName string
}

Jump to

Keyboard shortcuts

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