package loader

import (
	"context"

	"github.com/tidbcloud/devops/pkg/infra/config"
	"github.com/tidbcloud/devops/pkg/infra/log"
)

type ConfigurationSourceMemory struct {
	config *config.RootConfig
}

func NewConfigurationSourceMemory(config *config.RootConfig) *ConfigurationSourceMemory {
	return &ConfigurationSourceMemory{
		config: config,
	}
}

func (s *ConfigurationSourceMemory) Load(ctx context.Context, pre *config.RootConfig) (*config.RootConfig, error) {
	log.FromContext(ctx).Info("loading config from memory")
	return s.config, nil
}
