k8s

package
v0.0.0-...-0bc4b66 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OwnRel is k8s api object relation
	OwnRel = "isOwned"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, disc discovery.DiscoveryInterface, dyn dynamic.Interface, opts ...Option) *client

NewClient returns new kubernetes API client

func NewSource

func NewSource(s string) api.Source

NewSource returns api.Source for k8s api

Types

type API

type API struct {
	*gen.API
}

API is kubernetes API

func NewAPI

func NewAPI(s string) *API

NewAPI returns new K8s API object

type Link struct {
	*gen.Link
}

Link defines API object relation

func NewLink(from, to uuid.UID, rel api.Relation) *Link

NewLink returns new link

type Object

type Object struct {
	*gen.Object
}

Object is kubernetes API object

func NewObject

func NewObject(res api.Resource, raw unstructured.Unstructured) *Object

NewObject returns new kubernetes API object

type Option

type Option func(*Options)

Option is k8s option

func Namespace

func Namespace(ns string) Option

Namespace configures namespace

type Options

type Options struct {
	Namespace string
}

Options provides k8so options

type Relation

type Relation struct {
	*gen.Relation
}

Relation is link relation

func NewRelation

func NewRelation(r string) *Relation

NewRelation returns gen new relation

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource is API resource

func (Resource) Group

func (r Resource) Group() string

Group returns the API group of the resource

func (Resource) Kind

func (r Resource) Kind() string

Kind returns resource kind

func (Resource) Name

func (r Resource) Name() string

Name returns the name of the resource

func (Resource) Namespaced

func (r Resource) Namespaced() bool

Namespaced returns true if the resource is namespaced

func (Resource) Paths

func (r Resource) Paths() []string

Paths returns all possible variations of the resource paths

func (Resource) Version

func (r Resource) Version() string

Version returns the version of the resource

type Source

type Source struct {
	*gen.Source
}

Source is API source

type Top

type Top struct {
	*gen.Top
}

Top is Kubernetes API topology

func NewTop

func NewTop() *Top

NewTop creates a new empty topology and returns it

type UID

type UID struct {
	uuid.UID
}

UID implements API object UID

func NewUID

func NewUID(uid string) *UID

NewUID returns new UID

Jump to

Keyboard shortcuts

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