-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GCP/publisher): Implement publisher for GCP
- Loading branch information
1 parent
71001cf
commit 7a7716e
Showing
21 changed files
with
858 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Package google implement elMagician pubsub interfaces for GCP Pubsub provider. | ||
package google | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// Config for pubsub instance | ||
type Config struct { | ||
// ProjectID in GCP | ||
ProjectID string `yaml:"projectId" json:"projectId"` | ||
|
||
// CredentialsPath to your JSON credential provided by GCP. | ||
CredentialsPath string `yaml:"credentialsPath" json:"credentialsPath"` | ||
|
||
// Concurrency is the default concurrency for listening process. | ||
Concurrency int `yaml:"concurrency" json:"concurrency"` | ||
|
||
// Timeout is the default timeout for GCP calls | ||
Timeout time.Duration `yaml:"timeout" json:"timeout"` | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
package google | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/elmagician/pubsub" | ||
) | ||
|
||
var _ pubsub.Listener = (*Listener)(nil) | ||
|
||
type Listener struct{} | ||
|
||
func (l Listener) OnMessage(envelop pubsub.Envelop, newMessage func() pubsub.Message) chan pubsub.Message { | ||
panic("implement me") | ||
} | ||
|
||
func (l Listener) OnUnmatched() chan pubsub.Message { | ||
panic("implement me") | ||
} | ||
|
||
func (l Listener) OnError() chan error { | ||
panic("implement me") | ||
} | ||
|
||
func (l Listener) Listen(ctx context.Context) { | ||
panic("implement me") | ||
} | ||
|
||
func (l Listener) Stop() { | ||
panic("implement me") | ||
} |
Oops, something went wrong.