Rebrand pkg
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# ownCloud Infinite Scale: Runtime
|
||||
# OpenCloud: Runtime
|
||||
|
||||
Pman is a slim utility library for supervising long-running processes. It can be [embedded](https://github.com/owncloud/OCIS/blob/ea2a2b328e7261ed72e65adf48359c0a44e14b40/OCIS/pkg/runtime/runtime.go#L84) or used as a cli command.
|
||||
Pman is a slim utility library for supervising long-running processes. It can be embedded or used as a cli command.
|
||||
|
||||
When used as a CLI command it relays actions to a running runtime.
|
||||
|
||||
@@ -10,7 +10,7 @@ Start a runtime
|
||||
|
||||
```go
|
||||
package main
|
||||
import "github.com/owncloud/ocis/ocis/pkg/runtime/service"
|
||||
import "github.com/opencloude-eu/opencloud/opencloud/pkg/runtime/service"
|
||||
|
||||
func main() {
|
||||
service.Start()
|
||||
@@ -28,8 +28,8 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/owncloud/ocis/ocis/pkg/runtime/process"
|
||||
"github.com/owncloud/ocis/ocis/pkg/runtime/service"
|
||||
"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/process"
|
||||
"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service"
|
||||
"github.com/rs/zerolog/log"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -65,4 +65,4 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
Run the example above with `RUNTIME_KEEP_ALIVE=true` and with no `RUNTIME_KEEP_ALIVE` set to see its behavior. It requires an [oCIS binary](https://github.com/owncloud/ocis/releases) present in your `$PATH` for it to work.
|
||||
Run the example above with `RUNTIME_KEEP_ALIVE=true` and with no `RUNTIME_KEEP_ALIVE` set to see its behavior. It requires an [OpenCloud binary](https://github.com/opencloud-eu/opencloud/releases) present in your `$PATH` for it to work.
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"github.com/opencloud-eu/opencloud/pkg/config"
|
||||
)
|
||||
|
||||
// Runtime represents an oCIS runtime environment.
|
||||
// Runtime represents an OpenCloud runtime environment.
|
||||
type Runtime struct {
|
||||
c *config.Config
|
||||
}
|
||||
|
||||
// New creates a new oCIS + micro runtime
|
||||
// New creates a new OpenCloud + micro runtime
|
||||
func New(cfg *config.Config) Runtime {
|
||||
return Runtime{
|
||||
c: cfg,
|
||||
|
||||
@@ -93,7 +93,7 @@ type Service struct {
|
||||
// When used as a library, flags are not parsed, and in order to avoid introducing a global state with init functions
|
||||
// calls are done explicitly to loadFromEnv().
|
||||
// Since this is the public constructor, options need to be added, at the moment only logging options
|
||||
// are supported in order to match the running OwnCloud services structured log.
|
||||
// are supported in order to match the running OpenCloud services structured log.
|
||||
func NewService(ctx context.Context, options ...Option) (*Service, error) {
|
||||
opts := NewOptions()
|
||||
|
||||
@@ -349,9 +349,9 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
|
||||
}
|
||||
|
||||
// Start a rpc service. By default, the package scope Start will run all default services to provide with a working
|
||||
// oCIS instance.
|
||||
// OpenCloud instance.
|
||||
func Start(ctx context.Context, o ...Option) error {
|
||||
// Start the runtime. Most likely this was called ONLY by the `ocis server` subcommand, but since we cannot protect
|
||||
// Start the runtime. Most likely this was called ONLY by the `opencloud server` subcommand, but since we cannot protect
|
||||
// from the caller, the previous statement holds truth.
|
||||
|
||||
// prepare a new rpc Service struct.
|
||||
@@ -367,7 +367,7 @@ func Start(ctx context.Context, o ...Option) error {
|
||||
tolerance := 5
|
||||
totalBackoff := 0
|
||||
|
||||
// Start creates its own supervisor. Running services under `ocis server` will create its own supervision tree.
|
||||
// Start creates its own supervisor. Running services under `opencloud server` will create its own supervision tree.
|
||||
s.Supervisor = suture.New("opencloud", suture.Spec{
|
||||
EventHook: func(e suture.Event) {
|
||||
if e.Type() == suture.EventTypeBackoff {
|
||||
|
||||
Reference in New Issue
Block a user