func New(cfg *config.Config, pdAPIKey, slackAPIKey string, logger *zap.Logger, opts ...ClientOption) *Client {
	var o options
	for _, opt := range opts {
		opt(&o)
	}

	pdClient := NewPagerDutyClient(pdAPIKey)
	slackClient := NewSlackClient(slackAPIKey)
	c := &Client{
		config:    cfg,
		pagerduty: pdClient,
		slack:     slackClient,
		logger:    logger,
	}

	if o.externalTrigger {
		c.externalTrigger = o.externalTrigger
	} else {
		c.cron = cron.New()
	}

	return c
}
// New creates a Client for Slack & PagerDuty API.
New creates a Client for Slack & PagerDuty API.
// New creates a Client for Slack & PagerDuty API .
func New(cfg *config.Config, pdAPIKey, slackAPIKey string, logger *zap.Logger, opts ...ClientOption) *Client {
	var o options
	for _, opt := range opts {
		opt(&o)
	}
	pdClient := NewPagerDutyClient(pdAPIKey)
	slackClient := NewSlackClient(slackAPIKey)
	c := &Client{
		config:    cfg,
		pagerduty: pdClient,
		slack:     slackClient,
		logger:    logger,
	}
	if o.externalTrigger {
		c.externalTrigger = o.externalTrigger
	} else {
		c.cron = cron.New()
	}
	return c
}
func New ( cfg * config . Config , pdAPIKey , slackAPIKey string , logger * zap . Logger , opts ... ClientOption ) * Client { var o options for _ , opt := range opts { opt ( & o ) } pdClient := NewPagerDutyClient ( pdAPIKey ) slackClient := NewSlackClient ( slackAPIKey ) c := & Client { config : cfg , pagerduty : pdClient , slack : slackClient , logger : logger , } if o . externalTrigger { c . externalTrigger = o . externalTrigger } else { c . cron = cron . New ( ) } return c }
New creates a Client for Slack & PagerDuty API.
New creates a Client for Slack & PagerDuty API .