Documentation ¶
Index ¶
- type Client
- func (c *Client) GetGRPCClient() GRPCClient
- func (c *Client) GracefulStop() error
- func (c *Client) Send(ctx context.Context, name string, props map[string]string) error
- func (c *Client) SendAtTime(ctx context.Context, name string, props map[string]string, time time.Time) error
- func (c *Client) SendToTopic(ctx context.Context, name string, props map[string]string, topic string) error
- type GRPCClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func New ¶
func New( configPrefix string, config *viper.Viper, logger logger.Logger, client pb.GRPCForwarderClient, opts ...grpc.DialOption, ) (*Client, error)
New ctor configPrefix is whatever comes before `client` subpart of config
func NewClient ¶
func NewClient( configPrefix string, config *viper.Viper, logger logrus.FieldLogger, client pb.GRPCForwarderClient, opts ...grpc.DialOption, ) (*Client, error)
func (*Client) GetGRPCClient ¶
func (c *Client) GetGRPCClient() GRPCClient
func (*Client) GracefulStop ¶
GracefulStop waits pending async send of events and closes client connection
func (*Client) Send ¶
Send sends an event to another server via grpc using the client's configured topic
type GRPCClient ¶
type GRPCClient interface { GracefulStop() error // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.