Documentation
¶
Index ¶
Constants ¶
View Source
const ( ResourceVendorGoogleCloud = "gc" ResourceVendorAmazonWebService = "aws" )
View Source
const ( ResourceTypeTopic = "topic" ResourceTypeSubscription = "subscription" ResourceTypeQueue = "queue" )
View Source
const (
//ServiceID represents gloud messaging pubsub service id.
ServiceID = "pubsub"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Config ¶
type Config struct {
Topic *Resource
Labels map[string]string
Attributes map[string]string
AckDeadline time.Duration
RetentionDuration time.Duration
RetainAckedMessages bool
}
Config represent a subscription config
type CreateRequest ¶
type CreateRequest struct {
Resources []*ResourceSetup
}
CreateRequest represents a create resource request
func (*CreateRequest) Init ¶
func (r *CreateRequest) Init() error
func (*CreateRequest) Validate ¶
func (r *CreateRequest) Validate() error
type CreateResponse ¶
type CreateResponse struct {
Resources []*Resource
}
CreateResponse represents a create resource response
type DeleteRequest ¶
type DeleteRequest struct {
Resources []*Resource
}
DeleteRequest represents a delete resource request
func (*DeleteRequest) Init ¶
func (r *DeleteRequest) Init() error
type DeleteResponse ¶
type DeleteResponse struct{}
DeleteResponse represents a delete resource response
type PullRequest ¶
PullRequest represents a pull request
func (*PullRequest) Init ¶
func (r *PullRequest) Init() error
func (*PullRequest) Validate ¶
func (r *PullRequest) Validate() error
type PullResponse ¶
type PullResponse struct {
Messages []*Message
}
PullRequest represents a pull response
type PushRequest ¶
type PushRequest struct {
Dest *Resource
Messages []*Message
Source *url.Resource
TimeoutMs int
UDF string
// contains filtered or unexported fields
}
PushRequest represents push request
func (*PushRequest) Init ¶
func (r *PushRequest) Init() error
func (*PushRequest) Validate ¶
func (r *PushRequest) Validate() error
type PushResponse ¶
type PushResponse struct {
Results []Result
}
PushResponse represents a push response
type Resource ¶
type Resource struct {
URL string
Credentials string
ID string
Name string
Type string `description:"resource type: topic, subscription"`
Vendor string
// contains filtered or unexported fields
}
func NewResource ¶
NewResource creates a new resource
type ResourceSetup ¶
Resource represents resource setup
func NewResourceSetup ¶
func NewResourceSetup(resourceType, URL, credentials string, recreate bool, config *Config) *ResourceSetup
NewResourceSetup creates a new URL
Click to show internal directories.
Click to hide internal directories.