Skip to content

Commit

Permalink
feat!: unify name (vanus-labs#497)
Browse files Browse the repository at this point in the history
* docs: replace linkall.com with vanus.ai

Signed-off-by: James Yin <[email protected]>

* fix: download url

Signed-off-by: James Yin <[email protected]>

* feat: unify name

Signed-off-by: James Yin <[email protected]>

* fix: ut

Signed-off-by: James Yin <[email protected]>

---------

Signed-off-by: James Yin <[email protected]>
  • Loading branch information
ifplusor authored Mar 7, 2023
1 parent 786ba49 commit 722eac9
Show file tree
Hide file tree
Showing 102 changed files with 3,153 additions and 3,138 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you want to contribute to the codebase of Vanus, it's better to set up a deve
1. Install Go version 1.17 or above. Refer to [How to Write Go Code](https://go.dev/doc/code) for more information.
2. Install [minikube](https://minikube.sigs.k8s.io/docs/start/)(Users from China mainland may have network issues that need to be addressed for using minikube).
Vanus is a k8s based project.
3. Learning [QuickStart](https://docs.linkall.com/getting-started/quick-start) how to deploy the Vanus to k8s. Deploying a specified component to minikube for testing.
3. Learning [QuickStart](https://docs.vanus.ai/getting-started/quick-start) how to deploy the Vanus to k8s. Deploying a specified component to minikube for testing.
Click [here](#) for details.

## Issues
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It helps users build event pipelines between SaaS, cloud services, and cloud fun
[![codecov](https://codecov.io/gh/vanus-labs/vanus/branch/main/graph/badge.svg?token=RSXSIMEY4V)](https://codecov.io/gh/vanus-labs/vanus)
[![Language](https://img.shields.io/github/go-mod/go-version/vanus-labs/vanus?logo=go)](https://golang.org/)
[![playground](https://img.shields.io/badge/Playground-Try%20it%20%20free-red)](https://play.linkall.com)
[![playground](https://img.shields.io/badge/Docs-online-green)](https://linkall.com/docs)
[![docs](https://img.shields.io/badge/Docs-online-green)](https://docs.vanus.ai/)

<p>
<a href="https://join.slack.com/t/vanusworkspace/shared_invite/zt-1jilbbfo2-NxiFG0VOo8ABGCCNaeNfcA"><img src="https://img.shields.io/badge/slack-join-3CC798?style=social&logo=slack" height=23></a>
Expand Down Expand Up @@ -70,10 +70,10 @@ Vanus helps users build event pipelines between SaaS, cloud services, and cloud

## Getting Started

You can install Vanus with a single command within 1 minute. Check out our [website](https://linkall.com) for detailed information.
You can install Vanus with a single command within 1 minute. Check out our [website](https://vanus.ai) for detailed information.

```shell
kubectl apply -f https://download.linkall.com/all-in-one/v0.5.4.yml
kubectl apply -f https://dl.vanus.ai/all-in-one/v0.5.4.yml
```

We also provide an [interactive Kubernetes environment](https://play.linkall.com) to simply deploy and try Vanus in your browser.
Expand Down
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# EventBus SDK for Vanus
# Eventbus SDK for Vanus
2 changes: 1 addition & 1 deletion client/internal/vanus/eventbus/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package eventbus

// Config is the configuration of EventBus.
// Config is the configuration of Eventbus.
type Config struct {
Endpoints []string
Name string
Expand Down
16 changes: 8 additions & 8 deletions client/internal/vanus/eventbus/name_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ func NewNameService(endpoints []string) *NameService {
}

type NameService struct {
client ctrlpb.EventBusControllerClient
client ctrlpb.EventbusControllerClient
tracer *tracing.Tracer
}

func (ns *NameService) LookupWritableLogs(ctx context.Context, eventbus string) ([]*record.Eventlog, error) {
ctx, span := ns.tracer.Start(ctx, "LookupWritableLogs")
defer span.End()

req := &metapb.EventBus{
req := &metapb.Eventbus{
Name: eventbus,
}

resp, err := ns.client.GetEventBus(ctx, req)
resp, err := ns.client.GetEventbus(ctx, req)
if err != nil {
log.Error(context.Background(), "get eventbus failed", map[string]interface{}{
log.KeyError: err,
Expand All @@ -68,11 +68,11 @@ func (ns *NameService) LookupReadableLogs(ctx context.Context, eventbus string)
ctx, span := ns.tracer.Start(ctx, "LookupReadableLogs")
defer span.End()

req := &metapb.EventBus{
req := &metapb.Eventbus{
Name: eventbus,
}

resp, err := ns.client.GetEventBus(ctx, req)
resp, err := ns.client.GetEventbus(ctx, req)
if err != nil {
log.Error(context.Background(), "get eventbus failed", map[string]interface{}{
log.KeyError: err,
Expand All @@ -84,7 +84,7 @@ func (ns *NameService) LookupReadableLogs(ctx context.Context, eventbus string)
return toLogs(resp.GetLogs()), nil
}

func toLogs(logpbs []*metapb.EventLog) []*record.Eventlog {
func toLogs(logpbs []*metapb.Eventlog) []*record.Eventlog {
if len(logpbs) <= 0 {
return make([]*record.Eventlog, 0)
}
Expand All @@ -95,9 +95,9 @@ func toLogs(logpbs []*metapb.EventLog) []*record.Eventlog {
return logs
}

func toLog(logpb *metapb.EventLog) *record.Eventlog {
func toLog(logpb *metapb.Eventlog) *record.Eventlog {
log := &record.Eventlog{
ID: logpb.GetEventLogId(),
ID: logpb.GetEventlogId(),
Mode: record.PremWrite | record.PremRead,
}
return log
Expand Down
2 changes: 1 addition & 1 deletion client/internal/vanus/eventlog/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package eventlog

// Config is the configuration of EventLog.
// Config is the configuration of Eventlog.
type Config struct {
Endpoints []string
ID uint64
Expand Down
6 changes: 3 additions & 3 deletions client/internal/vanus/eventlog/name_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewNameService(endpoints []string) *NameService {
}

type NameService struct {
client ctrlpb.EventLogControllerClient
client ctrlpb.EventlogControllerClient
tracer *tracing.Tracer
}

Expand All @@ -53,7 +53,7 @@ func (ns *NameService) LookupWritableSegment(ctx context.Context, logID uint64)
defer span.End()

req := &ctrlpb.GetAppendableSegmentRequest{
EventLogId: logID,
EventlogId: logID,
Limited: 1,
}

Expand All @@ -79,7 +79,7 @@ func (ns *NameService) LookupReadableSegments(ctx context.Context, logID uint64)
defer span.End()

req := &ctrlpb.ListSegmentRequest{
EventLogId: logID,
EventlogId: logID,
StartOffset: 0,
EndOffset: math.MaxInt64,
Limited: math.MaxInt32,
Expand Down
6 changes: 3 additions & 3 deletions client/pkg/eventbus/eventbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ type eventbus struct {
tracer *tracing.Tracer
}

// make sure eventbus implements EventBus.
// make sure eventbus implements api.Eventbus.
var _ api.Eventbus = (*eventbus)(nil)

func (b *eventbus) defaultWriteOptions() *api.WriteOptions {
Expand Down Expand Up @@ -308,7 +308,7 @@ func (b *eventbus) updateWritableLogs(ctx context.Context, re *WritableLogsResul
Endpoints: b.cfg.Endpoints,
ID: logID,
}
lws[logID] = eventlog.NewEventLog(cfg)
lws[logID] = eventlog.NewEventlog(cfg)
return true
})
b.setWritableLogs(s, lws)
Expand Down Expand Up @@ -400,7 +400,7 @@ func (b *eventbus) updateReadableLogs(ctx context.Context, re *ReadableLogsResul
Endpoints: b.cfg.Endpoints,
ID: logID,
}
lws[logID] = eventlog.NewEventLog(cfg)
lws[logID] = eventlog.NewEventlog(cfg)
return true
})
b.setReadableLogs(s, lws)
Expand Down
4 changes: 2 additions & 2 deletions client/pkg/eventlog/eventlog_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
pollingPostSpan = 100 // in milliseconds.
)

func NewEventLog(cfg *el.Config) Eventlog {
func NewEventlog(cfg *el.Config) Eventlog {
l := &eventlog{
cfg: cfg,
nameService: el.NewNameService(cfg.Endpoints),
Expand Down Expand Up @@ -113,7 +113,7 @@ type eventlog struct {
tracer *tracing.Tracer
}

// make sure eventlog implements eventlog.EventLog.
// make sure eventlog implements Eventlog.
var _ Eventlog = (*eventlog)(nil)

func (l *eventlog) ID() uint64 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ func main() {
}

ctrlpb.RegisterSnowflakeControllerServer(grpcServer, snowflakeCtrl)
ctrlpb.RegisterEventBusControllerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterEventLogControllerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterEventbusControllerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterEventlogControllerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterSegmentControllerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterPingServerServer(grpcServer, segmentCtrl)
ctrlpb.RegisterTriggerControllerServer(grpcServer, triggerCtrlStv)
Expand Down
Loading

0 comments on commit 722eac9

Please sign in to comment.