builder

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

Go Client for Multi Language EKS Blueprints for cdk

Run the example

To run the example, first start the server

git clone https://github.com/aws-quickstart/cdk-eks-blueprints.git
cd cdk-eks-blueprints
git checkout blueprints-api-support
make run-server

Then run the go example by cloning this repository and running with make, go is required

git clone https://github.com/zjaco13/multi-lang-eks-blueprints-cdk.git
cd multi-lang-eks-blueprints-cdk
make go-example

How to use as a package

Create a new go project

mkdir example
cd example
go mod init example.com

Add this sdk as a library

go get github.com/zjaco13/multi-lang-eks-blueprints-cdk/sdks/go-sdk

Add this to a main.go file

package main

import (
	builder "github.com/zjaco13/multi-lang-eks-blueprints-cdk/sdks/go-sdk"
	pb "github.com/zjaco13/multi-lang-eks-blueprints-cdk/sdks/go-sdk/codegen"
)

func main() {
	builder.RunBuild(build)
}

func build(client pb.ClusterServiceClient, ctx context.Context) {
    ...
}

Add function calls to the gRPC server in the build function to build your EKS Blueprint

Run the server

git clone https://github.com/aws-quickstart/cdk-eks-blueprints.git
cd cdk-eks-blueprints
git checkout blueprints-api-support
make run-server

Run your code

go run main.go

From the server, deploy your EKS Blueprint

make deploy-server

Contributing

Publishing

A new version should be released whenever the protobufs are changed

To release a new version for the go sdk, push a new tagged commit to the origin repository e.g

git tag v0.1.2
git push origin v0.1.2

Make the module available on the proxy server using go list

GOPROXY=proxy.golang.org go list -m github.com/zjaco13/multi-lang-eks-blueprints-cdk/sdks/go-sdk@v0.1.2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBuild

func RunBuild(build func(pb.ClusterServiceClient, context.Context))

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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