diff --git a/cmd/charm/simple_tui/bubbletea_wrapper_service.go b/cmd/charm/simple_tui/bubbletea_wrapper_service.go index c1d5ac1..e5f6567 100644 --- a/cmd/charm/simple_tui/bubbletea_wrapper_service.go +++ b/cmd/charm/simple_tui/bubbletea_wrapper_service.go @@ -5,7 +5,6 @@ import ( "time" tea "github.com/charmbracelet/bubbletea" - "github.com/gravestench/runtime/pkg/events" "github.com/gravestench/servicemesh" ) @@ -23,7 +22,7 @@ func (b *bubbleteaService) Init(mesh servicemesh.Mesh) { b.bindExisting(mesh) - mesh.Events().On(events.EventServiceAdded, func(...any) { + mesh.Events().On(servicemesh.EventServiceAdded, func(...any) { b.bindExisting(mesh) }) } diff --git a/cmd/dependency_injection/non_service_dependencies/main.go b/cmd/dependency_injection/non_service_dependencies/main.go index 4d4c239..8351993 100644 --- a/cmd/dependency_injection/non_service_dependencies/main.go +++ b/cmd/dependency_injection/non_service_dependencies/main.go @@ -8,7 +8,7 @@ func main() { mesh := servicemesh.New() // each service has a dependency that is not - // actually resolved through the runtime but by + // actually resolved through the service mesh but by // some other means (that part is up to you). mesh.Add(newServiceWithAsyncDependencyResolution()) mesh.Add(newServiceWithAsyncDependencyResolution()) diff --git a/cmd/dependency_injection/non_service_dependencies/service.go b/cmd/dependency_injection/non_service_dependencies/service.go index a58a374..b5850c2 100644 --- a/cmd/dependency_injection/non_service_dependencies/service.go +++ b/cmd/dependency_injection/non_service_dependencies/service.go @@ -7,7 +7,6 @@ import ( "time" "github.com/google/uuid" - "github.com/gravestench/runtime/pkg" "github.com/gravestench/servicemesh" ) @@ -43,10 +42,10 @@ func (s *Service) DependenciesResolved() bool { return s.dependency != nil } -func (s *Service) ResolveDependencies(_ pkg.IsRuntime) { - // in this example, we are not using the runtime to find our dependencies, +func (s *Service) ResolveDependencies(_ servicemesh.Mesh) { + // in this example, we are not using the service mesh to find our dependencies, // they are resolved some other way (this is up to you). However, we - // do implement servicemesh.HasDependencies so that the runtime knows not + // do implement servicemesh.HasDependencies so that the service mesh knows not // to call Init unless until we have resolved our deps ourselves. } diff --git a/cmd/dependency_injection/service_dependencies/main.go b/cmd/dependency_injection/service_dependencies/main.go index 48c98b8..86e2bff 100644 --- a/cmd/dependency_injection/service_dependencies/main.go +++ b/cmd/dependency_injection/service_dependencies/main.go @@ -21,12 +21,12 @@ func main() { // the inverse is true of serviceB, which needs to call the A() method. // // both of these services implement servicemesh.HasDependencies, and they both - // will use the runtime to find and assign a service that matches the + // will use the service mesh to find and assign a service that matches the // interface they are looking for. mesh.Add(serviceA.New("serviceA instance")) mesh.Add(serviceB.New("serviceB instance")) - // when this runs, you will see the runtime initiates the dependency + // when this runs, you will see the service mesh initiates the dependency // resolution and the services will end up with their dependencies met. mesh.Run() } diff --git a/cmd/dependency_injection/service_dependencies/serviceA/service.go b/cmd/dependency_injection/service_dependencies/serviceA/service.go index 15713b1..3cba17e 100644 --- a/cmd/dependency_injection/service_dependencies/serviceA/service.go +++ b/cmd/dependency_injection/service_dependencies/serviceA/service.go @@ -47,7 +47,7 @@ func (s *Service) DependenciesResolved() bool { } func (s *Service) ResolveDependencies(mesh servicemesh.Mesh) { - // here, we iterate over all services from the runtime + // here, we iterate over all services from the service mesh // and check if the service implements something we need. for _, service := range mesh.Services() { if b, ok := service.(hasB); ok { diff --git a/cmd/dependency_injection/service_dependencies/serviceB/service.go b/cmd/dependency_injection/service_dependencies/serviceB/service.go index 8964008..3d08548 100644 --- a/cmd/dependency_injection/service_dependencies/serviceB/service.go +++ b/cmd/dependency_injection/service_dependencies/serviceB/service.go @@ -47,7 +47,7 @@ func (s *Service) DependenciesResolved() bool { } func (s *Service) ResolveDependencies(mesh servicemesh.Mesh) { - // here, we iterate over all services from the runtime + // here, we iterate over all services from the service mesh // and check if the service implements something we need. for _, service := range mesh.Services() { if a, ok := service.(hasA); ok { diff --git a/go.mod b/go.mod index 03b7331..88cd9ee 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/gin-contrib/gzip v0.0.6 github.com/gin-gonic/gin v1.9.1 github.com/google/uuid v1.5.0 - github.com/gravestench/runtime v0.0.0-20231002182113-640425b821c6 github.com/gravestench/servicemesh v0.0.0-20231217214505-398708ee4e08 github.com/hegedustibor/htgo-tts v0.0.0-20230402053941-cd8d1a158135 golang.org/x/oauth2 v0.15.0 @@ -100,7 +99,6 @@ require ( github.com/liquidweb/liquidweb-cli v0.6.9 // indirect github.com/liquidweb/liquidweb-go v1.6.3 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect @@ -128,7 +126,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/otp v1.3.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rs/zerolog v1.31.0 // indirect github.com/sacloud/libsacloud v1.36.2 // indirect github.com/sirupsen/logrus v1.7.0 // indirect github.com/spf13/cast v1.3.1 // indirect diff --git a/services/config_file/service.go b/services/config_file/service.go index bc95d45..8b7bef6 100644 --- a/services/config_file/service.go +++ b/services/config_file/service.go @@ -4,7 +4,6 @@ import ( "log/slog" "sync" - "github.com/gravestench/runtime/pkg/events" "github.com/gravestench/servicemesh" ) @@ -49,7 +48,7 @@ func (s *Service) Init(mesh servicemesh.Mesh) { } } - mesh.Events().On(events.EventServiceAdded, func(args ...any) { + mesh.Events().On(servicemesh.EventServiceAdded, func(args ...any) { if len(args) < 1 { return }