Documentation ¶
Index ¶
- func Decode(entity proto.Message, data string) error
- func Encode(entity proto.Message) (string, error)
- type Client
- func (c *Client) Ack(ctx context.Context, eventId string)
- func (c *Client) Close()
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) GetDomain(ctx context.Context, request *api.GetDomainRequest) (*api.GetResponse, error)
- func (c *Client) GetDomainIds(ctx context.Context, request *api.GetDomainIdsRequest) (*api.GetDomainIdsResponse, error)
- func (c *Client) Save(ctx context.Context, request *api.SaveRequest) (*api.SaveResponse, error)
- type ClientConfig
- type RedisDbConfig
- type RedisSearchConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
func (*Client) GetDomain ¶
func (c *Client) GetDomain(ctx context.Context, request *api.GetDomainRequest) (*api.GetResponse, error)
func (*Client) GetDomainIds ¶
func (c *Client) GetDomainIds(ctx context.Context, request *api.GetDomainIdsRequest) (*api.GetDomainIdsResponse, error)
func (*Client) Save ¶
func (c *Client) Save(ctx context.Context, request *api.SaveRequest) (*api.SaveResponse, error)
type ClientConfig ¶
type ClientConfig struct { RedisDbConfig RedisDbConfig RedisSearchConfig RedisSearchConfig Server string Streams []string StreamIds map[string]string ConsumerGroup string EventChannel chan<- *api.Event ErrorChannel chan<- error }
type RedisDbConfig ¶
type RedisDbConfig struct { DbAddress string `envconfig:"DEDB_REDIS_DB_ADDRESS"` Username string `envconfig:"DEDB_REDIS_DB_USERNAME"` Password string `envconfig:"DEDB_REDIS_DB_PASSWORD"` RedisCa string `envconfig:"DEDB_REDIS_DB_CA"` RedisUserCert string `envconfig:"DEDB_REDIS_DB_USER_CERT"` RedisUserKey string `envconfig:"DEDB_REDIS_DB_USER_KEY"` Index string `envconfig:"DEDB_REDIS_DB_INDEX"` MinIdle int `envconfig:"DEDB_REDIS_DB_MINIDLE"` MaxActive int `envconfig:"DEDB_REDIS_DB_MAXACTIVE"` IdleTimeout int64 `envconfig:"DEDB_REDIS_DB_IDLE_TIMEOUT"` DbIndex int `envconfig:"DEDB_REDIS_DB_DB_INDEX"` }
type RedisSearchConfig ¶
type RedisSearchConfig struct { DbAddress string `envconfig:"REDIS_SEARCH_DB_ADDRESS"` Username string `envconfig:"REDIS_SEARCH_DB_USERNAME"` Password string `envconfig:"REDIS_SEARCH_PASSWORD"` RedisCa string `envconfig:"REDIS_SEARCH_CA"` RedisUserCert string `envconfig:"REDIS_SEARCH_USER_CERT"` RedisUserKey string `envconfig:"REDIS_SEARCH_USER_KEY"` Index string `envconfig:"REDIS_SEARCH_INDEX"` MinIdle int `envconfig:"REDIS_SEARCH_MINIDLE"` MaxActive int `envconfig:"REDIS_SEARCH_MAXACTIVE"` IdleTimeout int64 `envconfig:"REDIS_SEARCH_IDLE_TIMEOUT"` DbIndex int `envconfig:"REDIS_SEARCH_DB_INDEX"` }
Click to show internal directories.
Click to hide internal directories.