kvm-operator: github.com/giantswarm/kvm-operator/service/controller/resource/endpoint Index | Files

package endpoint

import "github.com/giantswarm/kvm-operator/service/controller/resource/endpoint"


Package Files

create.go current.go delete.go desired.go error.go resource.go spec.go update.go


const (
    IPAnnotation      = "endpoint.kvm.giantswarm.io/ip"
    Name              = "endpoint"
    ServiceAnnotation = "endpoint.kvm.giantswarm.io/service"

func IsInvalidConfig Uses

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsMissingAnnotationError Uses

func IsMissingAnnotationError(err error) bool

func IsWrongTypeError Uses

func IsWrongTypeError(err error) bool

type Config Uses

type Config struct {
    G8sClient versioned.Interface
    K8sClient kubernetes.Interface
    Logger    micrologger.Logger

type Endpoint Uses

type Endpoint struct {
    Addresses []corev1.EndpointAddress
    Ports     []corev1.EndpointPort
    // IPs contains string representations of IP addresses. When the current state
    // is computed the list contains all IPs of the endpoint belonging to the
    // reconciled pod. When the desired state is computed the list contains only a
    // single IP, which is the IP of the reconciled pod.
    IPs              []string
    ResourceVersion  string
    ServiceName      string
    ServiceNamespace string

TODO Addresses and IPs are basically the same and we only need Addresses in fact. The whole thing could be refactored and simplified a little bit later.


type Resource Uses

type Resource struct {
    // contains filtered or unexported fields

func New Uses

func New(config Config) (*Resource, error)

func (*Resource) ApplyCreateChange Uses

func (r *Resource) ApplyCreateChange(ctx context.Context, obj, createState interface{}) error

func (*Resource) ApplyDeleteChange Uses

func (r *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteChange interface{}) error

func (*Resource) ApplyUpdateChange Uses

func (r *Resource) ApplyUpdateChange(ctx context.Context, obj, updateState interface{}) error

func (*Resource) GetCurrentState Uses

func (r *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) GetDesiredState Uses

func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)

func (*Resource) Name Uses

func (r *Resource) Name() string

func (*Resource) NewDeletePatch Uses

func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)

func (*Resource) NewUpdatePatch Uses

func (r *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)

Package endpoint imports 13 packages (graph) and is imported by 1 packages. Updated 2020-08-02. Refresh now. Tools for package owners.