fuseml-core

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0

README

FuseML Core

This repository contains the FuseML APIs definitions and core service.

Code structure:

  • design/ - contains specification consumed by Goa out of which REST API server and cli code are generated (HTTP and gRPC)
    • api.go - defines the http server and a list of services that the server will host
    • runnable.go - definition of the runnable service
    • openapi.go - defintion fo the openapi service, which exposes a HTTP file server endpoint serving the generated OpenAPI specification
  • gen/ - contains the boilerplate code generated by Goa (output of $ goa gen github.com/fuseml/fuseml-core/design)
    • runnable/ - houses the transport-independent runnable service code
    • grpc/ - contains the protocol buffer descriptions for the runnable gRPC service as well as the server and client code which hooks up the protoc-generated gRPC server and client code along with the logic to encode and decode requests and responses. The cli subdirectory contains the CLI code to build gRPC requests from the command line.
    • http/ - describes the HTTP transport which defines server and client code with the logic to encode and decode requests and responses and the CLI code to build HTTP requests from the command line. It also contains the Open API 2.0/3.0 specification files in both json and yaml formats
  • cmd/ - a basic implementation of the service along with buildable server files that spins up goroutines to start a HTTP and a gRPC server and client files that can make requests to the server (outpug of $ goa example github.com/fuseml/fuseml-core/design)
  • runnable.go - contains a dummy implementation of the methods described in the design (design/runnable.go) for the runnable service, the actual implementation goes here.

How to build and run:

  • run make deps to install go dependencies
  • run make to generate server, client and CLI code and build the bin/fuseml_core and bin/fuseml_core-cli binaries
  • run the binaries
    • export variables for GITEA_URL for both client and server, and GITEA_USERNAME, GITEA_PASSWORD for server side
    • use the --help flag to get the command line options that you can supply. By default the server listens on the follwing ports: 8000 (http) and 8080 (grpc)

NOTES

  • The code generated by goa gen cannot be edited. This directory is re-generated entirely from scratch each time the command is run (e.g. after the design has changed). This is by design to keep the interface between generated and non generated code clean and using standard Go constructs (i.e. function calls). The code generated by goa example however is your code. You should modify it, add tests to it etc. This command generates a starting point for the service to help bootstrap development - in particular it is NOT meant to be re-run when the design changes. Instead simply edit the files accordingly.

Directories

Path Synopsis
cmd
pkg
client
Package git is intended for git access from FuseML client It needs GITEA_URL set as environment variable.
Package git is intended for git access from FuseML client It needs GITEA_URL set as environment variable.
svc

Jump to

Keyboard shortcuts

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