flytestdlib

module
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0

README

🗑 As of Oct-23 we moved the development of this component to the monorepo. 🗑

Common Go Tools

Current Release Build Status GoDoc License CodeCoverage Go Report Card Commit activity Commit since last releast Slack

Shared components we found ourselves building time and time again, so we collected them in one place!

This library consists of:

  • config

    Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care of parsing, validating and watching for changes on config.

  • cli/pflags

    Tool to generate a pflags for all fields in a given struct.

    Install

    On POSIX systems, run: curl -sfL https://raw.githubusercontent.com/flyteorg/flytestdlib/godownloader/godownloader.sh | sh

    On Windows:

    Install scoop: iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

    Run: scoop bucket add flytestdlib https://github.com/flyteorg/flytestdlib.git

    Run: scoop install pflags

  • storage

    Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support.

  • contextutils

    Wrapper around golang's context to set/get known keys.

  • logger

    Wrapper around logrus that's configurable, taggable and context-aware.

  • profutils

    Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints.

  • promutils

    Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component.

  • atomic

    Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types.

  • sets

    Offers strongly types and convenient interface sets.

  • utils

  • version

Contributing

Versioning

This repo follows semantic versioning.

Releases

This repository is hooked up with goreleaser. Maintainers are expected to create tags and let goreleaser compose the release message and create a release.

To create a new release, follow these steps:

  • Create a PR with your changes.

  • [Optional] Create an alpha tag on your branch and push that.

    • First get existing tags git describe --abbrev=0 --tags

    • Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag)

    • Create a tag git tag v1.2.4-alpha.0

    • Push tag git push --tags

  • Merge your changes and checkout master branch git checkout master && git pull

  • Bump version tag and push to branch.

    • First get existing tags git describe --abbrev=0 --tags

    • Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to Semantic Versioning for information about when to bump each)

    • Create a tag git tag v1.2.4

    • Push tag git push --tags

Directories

Path Synopsis
Contains efficient array that stores small-range values (up to uint64) in a bit array to optimize storage.
Contains efficient array that stores small-range values (up to uint64) in a bit array to optimize storage.
cli
pflags
Generates a Register method to automatically add pflags to a pflagSet for all fields in a given type.
Generates a Register method to automatically add pflags to a pflagSet for all fields in a given type.
A strongly-typed config library to parse configs from PFlags, Env Vars and Config files.
A strongly-typed config library to parse configs from PFlags, Env Vars and Config files.
Package contextutils contains common flyte context utils.
Package contextutils contains common flyte context utils.
Contains utilities to use to create and consume simple errors.
Contains utilities to use to create and consume simple errors.
This package contains implementation for checking if an item has been seen previously.
This package contains implementation for checking if an item has been seen previously.
Package futures implements a simple Async Futures for golang
Package futures implements a simple Async Futures for golang
internal
Defines global context-aware logger.
Defines global context-aware logger.
This is a package that provides hashing utilities for Protobuf objects.
This is a package that provides hashing utilities for Protobuf objects.
Source: https://raw.githubusercontent.com/kubernetes/kubernetes/3dbbd0bdf44cb07fdde85aa392adf99ea7e95939/pkg/util/workqueue/prometheus/prometheus.go
Source: https://raw.githubusercontent.com/kubernetes/kubernetes/3dbbd0bdf44cb07fdde85aa392adf99ea7e95939/pkg/util/workqueue/prometheus/prometheus.go
Package storage defines extensible storage interface.
Package storage defines extensible storage interface.

Jump to

Keyboard shortcuts

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