Packager is now builder (#958)

This commit is contained in:
Milos Gajdos
2019-11-19 16:09:43 +00:00
committed by Asim Aslam
parent 5744050943
commit 6a0082741c
7 changed files with 38 additions and 37 deletions

34
runtime/build/build.go Normal file
View File

@@ -0,0 +1,34 @@
// Package build builds a micro runtime package
package build
import (
"github.com/micro/go-micro/runtime/source"
)
// Builder builds binaries
type Builder interface {
// Build builds a package
Build(*Source) (*Package, error)
// Clean deletes the package
Clean(*Package) error
}
// Source is the source of a build
type Source struct {
// Language is the language of code
Language string
// Location of the source
Repository *source.Repository
}
// Package is micro service package
type Package struct {
// Name of the binary
Name string
// Location of the binary
Path string
// Type of binary
Type string
// Source of the binary
Source *Source
}