fip-commons

module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: BSD-3-Clause

README

| Fury Logo | fip-commons |

GitHub release (latest SemVer) GitHub go.mod Go version GitHub Go Report Card

Table of Contents

Overview

This library contains common packages that can be used from multiples golang components in the Fury Intelligent platform architecture.

The first release includes a package to solve the problem while connecting to the Kubernetes API.

Getting Started

Installation

The simplest way to use this package is to download the package from the source repo as follows:

  • Using Go get
$ go get github.com/sighupio/fip-commons
#
Usage

To use this library add this dependency to your go.mod file by running the go get go get github.com/sighupio/fip-commons command. Then, import it in your golang codebase and use it:

package demo

import (
  "context"
  "fmt"

  "github.com/sighupio/fip-commons/pkg/kube" // Import it
)

// demo is an example implementation
func demo(){
  k := kube.KubernetesClient{KubeConfig: "/home/my-user/my-kubeconfig-path"}
  k.Init()
  ctx := context.TODO()
  err = k.Healthz(&ctx)
  if err != nil {
    fmt.Println("error. cluster seems to be not healthy")
  }
}
Examples

This repository contains an example implementation that list namespaces using the KubernetesClient exposed in this golang package. It is available in the examples directory. Follow the usage information in the corresponding README for more info.

Developer Guide

To set the code up locally, build, run tests, etc. Please refer the contributor's guide.

License

Check the License here

Directories

Path Synopsis
examples
pkg

Jump to

Keyboard shortcuts

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