hari

command module
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

Hari License GoDoc Travis CI Go Report Card

Hari is a distributed systems runtime for the Cloud and beyond.

About Hari

Hari addresses the key requirements for building distributed systems. It leverages the microservices architecture pattern and provides a set of services which act as the building blocks of a platform. Xinhari deals with the complexity of distributed systems and provides simpler programmable abstractions to build on.

Technology is constantly evolving. The infrastructure stack is always changing. Hari is a platform which addresses these issues with a pluggable foundation and strongly defined apis to build on. Plug into any stack or cloud.

Hari Features

The runtime is composed of the following features:

Services

Services are the core services that makeup the runtime. They provide a programmable abstraction layer for distributed systems infrastructure.

  • auth: Authentication and authorization is a core requirement for any production ready platform. Xinhari builds in an auth service for managing service to service and user to service authentication.

  • broker: A message broker allowing for async messaging. Microservices are event driven architectures and should provide messaging as a first class citizen. Notify other services of events without needing to worry about a response.

  • config: Manage dynamic config in a centralised location for your services to access. Has the ability to load config from multiple sources and enables you to update config without needing to restart services.

  • debug: Built in aggregation of stats, logs and tracing info for debugging. The debug service scrapes all services for their info to help understand the overall scope of the system from one location.

  • network: A drop in service to service networking solution. Offload service discovery, load balancing and fault tolerance to the network. The xinhari network dynamically builds a latency based routing table based on the local registry. It includes support for multi-cloud networking.

  • registry: The registry provides service discovery to locate other services, store feature rich metadata and endpoint information. It's a service explorer which lets you centrally and dynamically store this info at runtime.

  • runtime: A service runtime which manages the lifecycle of your service, from source to running. The runtime service can run natively locally or on kubernetes, providing a seamless abstraction across both.

  • store: State is a fundamental requirement of any system. We provide a key-value store to provide simple storage of state which can be shared between services or offload long term to keep microservices stateless and horizontally scalable.

Clients

Clients are entrypoints into the system. They enable access to your services through well known entrypoints.

  • api: An api gateway which acts as a single entry point for the frontend with dynamic request routing using service discovery.

  • bot: A slack bot which enables you to query and interact with Hari directly from within slack. It's great for ChatOps.

  • cli: Access services via the terminal. Every good developer tool needs a CLI as a defacto standard for operating a system.

  • proxy: An identity away proxy which allows you to access remote environments without painful configuration or vpn.

  • web: A dashboard to explore services, describe their endpoints, the request and response formats and query them directly.

Framework

To write applications which run on Hari you can use the framework Xinhari.

  • xinhari: Leverage the powerful Xinhari framework to develop microservices easily and quickly. Xinhari abstracts away the complexity of distributed systems and provides simpler abstractions to build highly scalable microservices.

Install

From source

go get xinhari.com/hari

Docker image

docker pull agus7fauzi/hari

Linux install

wget -q  https://raw.githubusercontent.com/xinhari/hari/main/scripts/install.sh -O - | /bin/bash

Mac OS install

curl -fsSL https://raw.githubusercontent.com/xinhari/hari/main/scripts/install.sh | /bin/bash

Windows install

powershell -Command "iwr -useb https://raw.githubusercontent.com/xinhari/hari/main/scripts/install.ps1 | iex"

Getting Started

Boot the entire runtime environment locally

hari server
Create a service
# generate a service (follow instructions in output)
hari new example

# set to use server
hari env set server

# run the service
hari run example

# list services
hari list services

# call a service
hari call go.micro.service.example Example.Call '{"name": "John"}'

Usage

See all the options

hari --help

Advanced development of Micro 2

See the docs for detailed information on the architecture, installation and use of the platform.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
client
api
Package api is an API Gateway
Package api is an API Gateway
api/proto
Package go_micro_api is a generated protocol buffer package.
Package go_micro_api is a generated protocol buffer package.
bot
Package bot is a Hubot style bot that sits a microservice environment
Package bot is a Hubot style bot that sits a microservice environment
bot/proto
Package go_micro_bot is a generated protocol buffer package.
Package go_micro_bot is a generated protocol buffer package.
cli
Package cli is a command line interface
Package cli is a command line interface
cli/new
Package new generates xinhari service templates
Package new generates xinhari service templates
cli/util
Package cliutil contains methods used across all cli commands @todo: get rid of os.Exits and use errors instread
Package cliutil contains methods used across all cli commands @todo: get rid of os.Exits and use errors instread
proxy
Package proxy is a cli proxy
Package proxy is a cli proxy
web
Package web is a web dashboard
Package web is a web dashboard
cmd
protoc-gen-micro
protoc-gen-micro is a plugin for the Google protocol buffer compiler to generate Go code.
protoc-gen-micro is a plugin for the Google protocol buffer compiler to generate Go code.
protoc-gen-micro/generator
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
protoc-gen-xinhari
protoc-gen-xinhari is a plugin for the Google protocol buffer compiler to generate Go code.
protoc-gen-xinhari is a plugin for the Google protocol buffer compiler to generate Go code.
protoc-gen-xinhari/generator
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
internal
platform
Package platform manages the runtime services as a platform
Package platform manages the runtime services as a platform
plugins
Package plugins includes the plugins we want to load
Package plugins includes the plugins we want to load
plugins/store/cloudflare
Package cloudflare is a store implementation backed by cloudflare workers kv Note that the cloudflare workers KV API is eventually consistent.
Package cloudflare is a store implementation backed by cloudflare workers kv Note that the cloudflare workers KV API is eventually consistent.
resolver/api
Package micro provides a micro rpc resolver which prefixes a namespace
Package micro provides a micro rpc resolver which prefixes a namespace
usage
Package usage tracks micro usage
Package usage tracks micro usage
usage/proto
Package usage is a generated protocol buffer package.
Package usage is a generated protocol buffer package.
version
Package version
Package version
platform
infra
Package infra provides functions for orchestrating a Micro platform
Package infra provides functions for orchestrating a Micro platform
Package service provides a xinhari service
Package service provides a xinhari service
broker
Package broker is the micro broker
Package broker is the micro broker
debug
Package debug implements metrics/logging/introspection/...
Package debug implements metrics/logging/introspection/...
debug/stats/handler
Package handler is the handler for the `micro debug stats` service
Package handler is the handler for the `micro debug stats` service
debug/trace/handler
Package handler is the handler for the `micro debug trace` service
Package handler is the handler for the `micro debug trace` service
health
Package health is a healthchecking sidecar
Package health is a healthchecking sidecar
network
package network implements micro network node
package network implements micro network node
network/api
Package api is the network api
Package api is the network api
network/dns
Package dns provides a DNS registration service for autodiscovery of core network nodes.
Package dns provides a DNS registration service for autodiscovery of core network nodes.
network/dns/handler
Package handler is the handler for the `micro network dns` command
Package handler is the handler for the `micro network dns` command
network/dns/provider
Package provider lets you abstract away any number of DNS providers
Package provider lets you abstract away any number of DNS providers
network/dns/provider/cloudflare
Package cloudflare is a dns Provider for cloudflare
Package cloudflare is a dns Provider for cloudflare
network/handler
Package handler implements network RPC handler
Package handler implements network RPC handler
registry
Package registry is the micro registry
Package registry is the micro registry
runtime
Package runtime is the micro runtime Package runtime is the micro runtime
Package runtime is the micro runtime Package runtime is the micro runtime
runtime/profile
Package profile is for specific profiles @todo this package is the definition of cruft and should be rewritten in a more elegant way
Package profile is for specific profiles @todo this package is the definition of cruft and should be rewritten in a more elegant way
runtime/scheduler
Package scheduler is a file server notifer
Package scheduler is a file server notifer
store/cli
Package cli implements the `micro store` subcommands for example: micro store snapshot micro store restore micro store sync
Package cli implements the `micro store` subcommands for example: micro store snapshot micro store restore micro store sync

Jump to

Keyboard shortcuts

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