client

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 8 Imported by: 19 modules, 38 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Build Status

client-go-client

A client-go implementation of the Manifestival Client.

Usage

import (
    mfc "github.com/manifestival/client-go-client"
    mf  "github.com/manifestival/manifestival"
    "k8s.io/client-go/rest"
)

func main() {
    var config *rest.Config = ...

    manifest, err := mfc.NewManifest("file.yaml", config)
    if err != nil {
        panic("Failed to load manifest")
    }
    manifest.Apply()

    // a slightly more complex example
    client, _ := mfc.NewClient(config)
    m, err := mf.ManifestFrom(mf.Recursive("dir/"), mf.UseClient(client))
    if err != nil {
        panic("Failed to load manifest")
    }
    m.Apply()
}

The NewManifest function in this library delegates to the function of the same name in the manifestival package after constructing a manifestival.Client implementation from the *rest.Config.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *rest.Config) (mf.Client, error)

NewClient returns a manifestival client based on a rest config

func NewManifest

func NewManifest(pathname string, config *rest.Config, opts ...mf.Option) (mf.Manifest, error)

NewManifest returns a manifestival Manifest based on a path and config

func NewUnsafeDynamicClient added in v0.3.0

func NewUnsafeDynamicClient(client dynamic.Interface) (mf.Client, error)

NewUnsafeDynamicClient returns a manifestival client based on dynamic kubernetes client

Types

This section is empty.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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