Building a service: EGo

To get your Go service ready for Marblerun, you possibly need to adapt its code slightly and you need to rebuild it. Details are given in the following.


Future versions of EGo will support building Marblerun services with zero changes.

Make your service use the provided TLS credentials

If your service already uses TLS and gets the credentials from, e.g., a file, you just need to adapt the Manifest. Otherwise, you need to make small code changes.

We provide a convenience package called With it, a service can automatically get and use its Marblerun TLS credentials. The following gives an example.

    serverCfg, err := marble.GetTLSConfig(false)
    if err != nil {
        log.Fatalf("Failed to retrieve server TLS config")
    // use serverCfg, e.g., to create an HTTPS server

Re-compile/build your service for Marblerun

Finally, you need to re-build your service for the enclave environment with ego-go and sign it with ego sign. Please follow the build instructions for Go provided in our Go sample.