Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
alancolant committed Jul 10, 2024
2 parents 983c8b1 + c7f631b commit 216eed7
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Contributions and feedback are welcome!
* [3. Partial Fields ✅](#3-partial-fields-)
* [Planned Features](#planned-features)
* [Drivers](#drivers)
* [Upgrade from Old Structure](#upgrade-from-old-structure)
* [Key Changes:](#key-changes)
* [Upgrade guide](#upgrade-guide)
* [Contributing](#contributing)
* [Credits](#credits)
* [License](#license)
Expand Down Expand Up @@ -164,6 +167,62 @@ The following features are planned for future implementation:

You can see all drivers details [here](pkg/drivers/README.md)

## Upgrade from Old Structure

In the previous structure, our project was divided into three distinct sub-modules, making it cumbersome to manage and
integrate changes.

We have now merged these sub-modules into a single, unified
module: [github.com/quix-labs/flash](https://github.com/quix-labs/flash).

This consolidation simplifies the codebase and streamlines development.

### Key Changes:

* **Unified Repository**:

The previously separate sub-modules are now combined into one repository.
This allows for easier dependency management and a more cohesive development process.


* **Separate Driver Installation**:

While the core functionality is now in one place, the drivers need to be installed separately.
This modular approach ensures that you only include what you need, keeping your projects lightweight.

* **No default driver**:

By default, we are previously using trigger driver, to keep user informed, the user require now to instanciate the
driver and pass it in ClientConfig

### Upgrade Guide

* Replace all your `client.NewClient(&type.ClientConfig{})` by `flash.NewClient(&flash.ClientConfig{})`
* Replace all your `listeners.NewListener(types.ListenerConfig{})` by `flash.NewListener(&flash.ListenerConfig{})`
* Instantiate the `Driver` in your codebase and pass it to `flash.ClientConfig{}`

```go
package main

import (
"github.com/quix-labs/flash"
"github.com/quix-labs/flash/drivers/trigger"
)

func main() {
// Instantiation of driver is now required
driver := trigger.NewDriver(&trigger.DriverConfig{})
client := flash.NewClient(&flash.ClientConfig{
Driver: driver,
})

// Instead of listeners.NewListener, use flash.NewListener
listener := flash.NewListener(&flash.ListenerConfig{})

// Your additional code here
}
```

## Contributing

1. Fork the repository.
Expand Down

0 comments on commit 216eed7

Please sign in to comment.