Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce internal/fwserver package and migrate GetProviderSchema #319

Merged
merged 1 commit into from May 6, 2022

Commits on May 6, 2022

  1. Introduce internal/fwserver package and migrate GetProviderSchema

    Reference: #215
    
    This step of the provider server refactoring introduces a new `internal/fwserver` package that will contain the provider server implementation for any protocol version, there only being a version 6 implementation at the moment. This package will contain only framework-native types that aren't already defined by the `tfsdk` package that are used by provider developers today, which is necessary to prevent import cycles. The protocol specific implementations will then wrap this framework server implementation and handle any necessary conversion of protocol specific types to framework specific types and back. Eventually, the existing `internal/proto6server` implementation will make no reference to any framework native types except the framework server and protocol type conversions.
    
    For now, only the `GetProviderSchema` RPC is migrated to show what this refactoring will look like for the rest of the RPCs.
    
    This has a few benefits which can be seen here including clear abstractions for protocol specific handling versus generic framework handling and unit testing at those abstraction boundaries.
    bflad committed May 6, 2022
    Copy the full SHA
    b2bd12c View commit details
    Browse the repository at this point in the history