elasticstream/source/elastic/configure.go

19 lines
269 B
Go
Raw Normal View History

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 {
if c == nil || c.ch == nil {
return fmt.Errorf("error source not opened for reading")
}
c.cfg = cfg
2024-10-07 15:25:13 +05:30
return nil
}