writeSeedFile writes the cluster seed to the object store.
(ctx context.Context, seed ClusterSeed)
| 237 | |
| 238 | // writeSeedFile writes the cluster seed to the object store. |
| 239 | func (rep *Reporter) writeSeedFile(ctx context.Context, seed ClusterSeed) error { |
| 240 | data, err := JSONCodec.Encode(seed) |
| 241 | if err != nil { |
| 242 | return err |
| 243 | } |
| 244 | return rep.writer.Write(ctx, backend.ClusterSeedFileName, []string{}, bytes.NewReader(data), int64(len(data)), nil) |
| 245 | } |
| 246 | |
| 247 | // running inits the reporter seed and start sending report for every interval |
| 248 | func (rep *Reporter) running(ctx context.Context) error { |
no test coverage detected