proxy

package
v0.0.0-...-bbe9989 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosMsgKey

type CosMsgKey struct {
	Format         string   `json:"format"`
	RequestId      string   `json:"request_id"`
	NotificationId string   `json:"notification_id"`
	Recipients     []string `json:"recipients"`
}

type CosPayload

type CosPayload struct {
	Notification json.RawMessage `json:"notification"`
}

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(retryCache RetryCache) (*Proxy, error)

func (*Proxy) StartProxy

func (p *Proxy) StartProxy() error

StartProxy starts the HTTP server

type ProxyConfig

type ProxyConfig struct {
	RetryTimeToLive  int    `required:"true" envconfig:"cos_proxy_env_retry_time_to_live"`
	ProxyName        string `required:"true" envconfig:"cos_proxy_env_pod_name"`
	ProxyNamespace   string `required:"true" envconfig:"cos_proxy_env_pod_namespace"`
	ProxyStatefulSet string `required:"true" envconfig:"cos_proxy_env_pod_statefulset"`
}

func GetConfig

func GetConfig() (ProxyConfig, error)

type RetryCache

type RetryCache interface {
	Add(value ...interface{}) error
}

type RetryEntry

type RetryEntry struct {
	Recipient     string `json:"recipient"`
	Origination   int64  `json:"origination"`
	MsgKey        []byte `json:"msgKey"`
	MsgValue      []byte `json:"msgValue"`
	NextRetryTime int64  `json:"nextRetryTime"`
	Retries       int    `json:"retries"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL