2024-10-07 15:25:13 +05:30
|
|
|
package elastic
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-10-07 16:49:36 +05:30
|
|
|
"fmt"
|
2024-10-07 16:26:41 +05:30
|
|
|
|
|
|
|
"elasticstream/config"
|
2024-10-07 15:25:13 +05:30
|
|
|
)
|
|
|
|
|
2024-10-07 16:49:36 +05:30
|
|
|
func (c *Client) Configure(ctx context.Context, cfg *config.Config) error {
|
|
|
|
|
2024-10-07 22:41:59 +05:30
|
|
|
// if c == nil || c.ch == nil {
|
|
|
|
if c == nil {
|
2024-10-07 16:49:36 +05:30
|
|
|
return fmt.Errorf("error source not opened for reading")
|
|
|
|
}
|
|
|
|
|
|
|
|
c.cfg = cfg
|
2024-10-07 15:25:13 +05:30
|
|
|
return nil
|
|
|
|
}
|