Documentation ¶
Index ¶
- Constants
- type AlgoBalancer
- type Balancer
- type BalancerEntry
- type Batch
- type BatchItem
- type Codebase
- type PipyRepoClient
- func NewRepoClient(repoRootAddr string) *PipyRepoClient
- func NewRepoClientWithApiBaseUrl(repoApiBaseUrl string) *PipyRepoClient
- func NewRepoClientWithApiBaseUrlAndTransport(repoApiBaseUrl string, transport *http.Transport) *PipyRepoClient
- func NewRepoClientWithTransport(repoRootAddr string, transport *http.Transport) *PipyRepoClient
- type Router
- type RouterEntry
- type ServiceInfo
- type ServiceRegistry
- type ServiceRegistryEntry
- type Target
- type Upstream
Constants ¶
View Source
const ( PipyRepoApiBaseUrlTemplate = "%s://%s" + commons.DefaultPipyRepoApiPath IngressPath = "/ingress" ServiceBasePath = "/service" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgoBalancer ¶
type AlgoBalancer string
const ( RoundRobinLoadBalancer AlgoBalancer = "RoundRobinLoadBalancer" HashingLoadBalancer AlgoBalancer = "HashingLoadBalancer" LeastWorkLoadBalancer AlgoBalancer = "LeastWorkLoadBalancer" )
type Balancer ¶
type Balancer struct {
Services BalancerEntry `json:"services"`
}
type BalancerEntry ¶
type Codebase ¶
type Codebase struct { Version int64 `json:"version,omitempty"` Path string `json:"path,omitempty"` Main string `json:"main,omitempty"` Base string `json:"base,omitempty"` Files []string `json:"files,omitempty"` EditFiles []string `json:"editFiles,omitempty"` ErasedFiles []string `json:"erasedFiles,omitempty"` Derived []string `json:"derived,omitempty"` }
type PipyRepoClient ¶
type PipyRepoClient struct {
// contains filtered or unexported fields
}
func NewRepoClient ¶
func NewRepoClient(repoRootAddr string) *PipyRepoClient
func NewRepoClientWithApiBaseUrl ¶
func NewRepoClientWithApiBaseUrl(repoApiBaseUrl string) *PipyRepoClient
func NewRepoClientWithApiBaseUrlAndTransport ¶
func NewRepoClientWithApiBaseUrlAndTransport(repoApiBaseUrl string, transport *http.Transport) *PipyRepoClient
func NewRepoClientWithTransport ¶
func NewRepoClientWithTransport(repoRootAddr string, transport *http.Transport) *PipyRepoClient
func (*PipyRepoClient) Batch ¶
func (p *PipyRepoClient) Batch(batches []Batch) error
func (*PipyRepoClient) DeriveCodebase ¶
func (p *PipyRepoClient) DeriveCodebase(path, base string) error
func (*PipyRepoClient) IsRepoUp ¶
func (p *PipyRepoClient) IsRepoUp() bool
type Router ¶
type Router struct {
Routes RouterEntry `json:"routes"`
}
type RouterEntry ¶
type RouterEntry map[string]ServiceInfo
type ServiceInfo ¶
type ServiceRegistry ¶
type ServiceRegistry struct {
Services ServiceRegistryEntry `json:"services"`
}
type ServiceRegistryEntry ¶
TODO: change the type to map[string][]Targets
type Upstream ¶
type Upstream struct { Targets []string `json:"targets"` Balancer AlgoBalancer `json:"balancer,omitempty"` Sticky bool `json:"sticky,omitempty"` }
TODO: change the type to Targets []Target
Click to show internal directories.
Click to hide internal directories.