Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from vmware/topic/latest-docs
Browse files Browse the repository at this point in the history
Syncing README content across repos
  • Loading branch information
daveshanley authored Jan 15, 2021
2 parents 0f95a0f + 7dc568a commit f8f4672
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 51 deletions.
28 changes: 0 additions & 28 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Our Pledge

We as members, contributors, and leaders pledge to make participation in Transport Go and our
We as members, contributors, and leaders pledge to make participation in transport-go and our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
Expand Down
64 changes: 56 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Transport for Go
# Transport - Golang

badges to be added in.
Transport is a full stack, simple, fast, expandable application event bus for your applications.

## Using the Transport
### What does that mean?

Transport is an event bus, that allows application developers to build components that can talk to one another, really easily.

It provides a standardized and simple API, implemented in multiple languages, to allow any individual component inside your applications to talk to one another.

It really comes to life when you use it to send messages, requests, responses and events around your backend and front-end. Your Java or Golang backend can stream messages to your UI components, as if they were sitting right next to each other.

Channels can be extended to major brokers like Kafka or RabbitMQ, so Transport becomes an 'on/off-ramp' for your main sources of truth.

### [View Transport Golang Documentation](https://vmware.github.io/transport/golang)

#### [Transport Docs Repo](https://github.com/vmware/transport)

## Quick Start

To create an instance of the bus

```go
bf := bus.GetBus()
var transport EventBus = bus.GetBus()
```

The API is pretty simple.
Expand Down Expand Up @@ -76,9 +90,9 @@ A simple ping pong looks a little like this.

```go
// listen for a single request on 'some-channel'
bf := bus.GetBus()
tr := bus.GetBus()
channel := "some-channel"
bf.GetChannelManager().CreateChannel(channel)
tr.GetChannelManager().CreateChannel(channel)

// listen for a single request on 'some-channel'
requestHandler, _ := bf.ListenRequestStream(channel)
Expand All @@ -88,14 +102,14 @@ requestHandler.Handle(
fmt.Printf("\nPing: %s\n", pingContent)

// send a response back.
bf.SendResponseMessage(channel, pingContent, msg.DestinationId)
tr.SendResponseMessage(channel, pingContent, msg.DestinationId)
},
func(err error) {
// something went wrong...
})

// send a request to 'some-channel' and handle a single response
responseHandler, _ := bf.RequestOnce(channel, "Woo!")
responseHandler, _ := tr.RequestOnce(channel, "Woo!")
responseHandler.Handle(
func(msg *model.Message) {
fmt.Printf("Pong: %s\n", msg.Payload.(string))
Expand Down Expand Up @@ -207,3 +221,37 @@ func usingGalacticChannels() {
}
}
```

### [Read More Golang Documentation](https://vmware.github.io/transport/golang)

## Contributing

The transport-typescript project team welcomes contributions from the community. Before you start working with transport-typescript, please
read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be
signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on
as an open-source patch. For more detailed information, refer to [CONTRIBUTING.md](CONTRIBUTING.md).

## License
BSD-2-Clause

Copyright (c) 2016-2021, VMware, Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 changes: 2 additions & 14 deletions build-transport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# Copyright 2019-2020 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
#
# This script will build the binary sample application for transport, requires docker.
# This script will build the binary sample application for transport
#
COLOR_RESET="\033[0m"
COLOR_RED="\033[38;5;9m"
COLOR_LIGHTCYAN="\033[1;36m"
COLOR_LIGHTGREEN="\033[1;32m"

COMMANDS=(transport)
COMMANDS=(transport-go)
OUT_DIR=${OUT_DIR:-./}
BUILD_TIME=`date | sed -e 's/ /_/g'`
TARGET_OS=${TARGET_OS:-darwin}
Expand Down Expand Up @@ -40,17 +40,6 @@ _trap() {
exit 1
}

check_prerequisites() {
if [ "${LOCAL_BUILD}" = "1" ] ; then
# we're inside the transport container. no need to check docker daemon
return
fi
docker ps >/dev/null 2>&1
if [ $? -gt 0 ] ; then
error "Docker failed to respond! Please check if Docker Engine is running"
fi
}

build() {
local CMD=$1
info "Building ${CMD} for ${TARGET_OS} ${TARGET_ARCH}..."
Expand Down Expand Up @@ -93,7 +82,6 @@ done
# ensure output dir exist
mkdir -p ${OUT_DIR}

check_prerequisites
for CMD in ${COMMANDS[@]} ; do
GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} build $CMD
done
Expand Down

0 comments on commit f8f4672

Please sign in to comment.