Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APCopy ¶
type APCopy ApiPlugin
APCopy provides an alias of the ApiPlugin to be utilised in unmarshalling of JSON data.
type ApiPlugin ¶
type ApiPlugin struct { unversioned.TypeMeta `json:",inline"` Metadata api.ObjectMeta `json:"metadata"` Spec Spec `json:"spec"` }
ApiPlugin provides the type for an API plugin resource in Kubernetes.
func (*ApiPlugin) GetObjectKind ¶
func (p *ApiPlugin) GetObjectKind() unversioned.ObjectKind
GetObjectKind provides the method to expose the kind of our ApiPlugin object.
func (*ApiPlugin) GetObjectMeta ¶
GetObjectMeta Retrieves the metadata for the ApiPlugin.
func (*ApiPlugin) UnmarshalJSON ¶
UnmarshalJSON provides the way in which JSON should be unmarshalled correctly for this type. This is a temporary workaround for https://github.com/kubernetes/client-go/issues/8
type ApiPluginList ¶
type ApiPluginList struct { unversioned.TypeMeta `json:",inline"` Metadata unversioned.ListMeta `json:"metadata"` Items []ApiPlugin `json:"items"` }
ApiPluginList provides the type encapsulating a list of ApiPlugin resources.
func (*ApiPluginList) GetListMeta ¶
func (l *ApiPluginList) GetListMeta() unversioned.List
GetListMeta Retrieves the metadata for the ApiPlugin List.
func (*ApiPluginList) GetObjectKind ¶
func (l *ApiPluginList) GetObjectKind() unversioned.ObjectKind
GetObjectKind provides the method to expose the kind of our ApiPlugin List object.
func (*ApiPluginList) UnmarshalJSON ¶
func (l *ApiPluginList) UnmarshalJSON(data []byte) error
UnmarshalJSON provides the way in which JSON should be unmarshalled correctly for this list type. Temporary workaround for https://github.com/kubernetes/client-go/issues/8
type ListCopy ¶
type ListCopy ApiPluginList
ListCopy provides the type alias for list to be used in unmarshalling from JSON.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service deals with monitoring and responding to events on api plugin resources in k8s and updating the Kong representations accordingly.
func NewService ¶
func NewService(k8sRestClient *rest.RESTClient, k8sClient *k8sclient.Client, kong *kong.Client, namespace string, apiLabel string, pluginServiceSelectorLabel string) *Service
NewService creates a new instance of the ApiPlugin service.
type Spec ¶
type Spec struct { // The name of the plugin to be attached to a specified // k8s service that also represents a Kong API object. Name string `json:"name"` // Configuration for the plugin as expected by Kong. // Keys in this map should avoid the config. prefix // as will be automatically prepended when requests are made to Kong. Config map[string]interface{} `json:"config"` // Label selector for selecting the services the ApiPlugin resource // should be attached to. This will then create a new plugin on the API object // in Kong. Selector map[string]string `json:"selector"` }
Spec provides the type for the specification of the plugin resource specification.