Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeUpstreamSpec(spec UpstreamSpec) *types.Struct
- func GetClient(address, caCert, clientCert, clientKey string) (copilot.IstioClient, error)
- func GetClientFromOptions(opts bootstrap.CoPilotOptions) (copilot.IstioClient, error)
- func GetEndpointsForUpstream(ctx context.Context, client copilot.IstioClient, u *v1.Upstream) ([]endpointdiscovery.Endpoint, error)
- func GetEndpointsFromResponse(resp *copilotapi.RoutesResponse, us *v1.Upstream) ([]endpointdiscovery.Endpoint, error)
- func GetUpstreams(ctx context.Context, client copilot.IstioClient) ([]*v1.Upstream, error)
- func GetUpstreamsFromResponse(resp *copilotapi.RoutesResponse) ([]*v1.Upstream, error)
- func HostnameToUpstreamName(hostname string) string
- func MakeStopCancelContext(ctx context.Context, stop <-chan struct{}) (context.Context, context.CancelFunc)
- func NewEndpointDiscovery(ctx context.Context, client copilot.IstioClient, resyncDuration time.Duration) endpointdiscovery.Interface
- func ResyncLoop(ctx context.Context, stop <-chan struct{}, resync func(), ...)
- func ResyncLoopWithKick(ctx context.Context, stop <-chan struct{}, resync func(), ...)
- func ResyncLoopWithTicker(ctx context.Context, resync func(), ticker <-chan time.Time, ...)
- type Plugin
- type UpstreamSpec
Constants ¶
View Source
const UpstreamTypeCF = "cloudfoundry"
Variables ¶
View Source
var WrongUpstreamType error = errors.New("wrong upstream type")
Functions ¶
func EncodeUpstreamSpec ¶
func EncodeUpstreamSpec(spec UpstreamSpec) *types.Struct
func GetClient ¶
func GetClient(address, caCert, clientCert, clientKey string) (copilot.IstioClient, error)
func GetClientFromOptions ¶
func GetClientFromOptions(opts bootstrap.CoPilotOptions) (copilot.IstioClient, error)
func GetEndpointsForUpstream ¶
func GetEndpointsForUpstream(ctx context.Context, client copilot.IstioClient, u *v1.Upstream) ([]endpointdiscovery.Endpoint, error)
func GetEndpointsFromResponse ¶
func GetEndpointsFromResponse(resp *copilotapi.RoutesResponse, us *v1.Upstream) ([]endpointdiscovery.Endpoint, error)
func GetUpstreams ¶
func GetUpstreamsFromResponse ¶
func GetUpstreamsFromResponse(resp *copilotapi.RoutesResponse) ([]*v1.Upstream, error)
func HostnameToUpstreamName ¶
func MakeStopCancelContext ¶
func NewEndpointDiscovery ¶
func NewEndpointDiscovery(ctx context.Context, client copilot.IstioClient, resyncDuration time.Duration) endpointdiscovery.Interface
func ResyncLoop ¶
func ResyncLoopWithKick ¶
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) ProcessUpstream ¶
func (*Plugin) SetupEndpointDiscovery ¶
func (p *Plugin) SetupEndpointDiscovery() (endpointdiscovery.Interface, error)
type UpstreamSpec ¶
type UpstreamSpec struct {
Hostname string `json:"hostname"`
}
func DecodeUpstreamSpec ¶
func DecodeUpstreamSpec(generic v1.UpstreamSpec) (*UpstreamSpec, error)
Click to show internal directories.
Click to hide internal directories.