Skip to content

Commit 8162217

Browse files
committed
Remove protocol 5 support
1 parent 33541be commit 8162217

File tree

4 files changed

+2155
-4139
lines changed

4 files changed

+2155
-4139
lines changed

docs/plugin-protocol/tfplugin5.10.proto

-105
Original file line numberDiff line numberDiff line change
@@ -354,19 +354,6 @@ service Provider {
354354
//////// Provider-contributed Functions
355355
rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
356356

357-
// ValidateStorageConfig fills in any default values and performs configuration validation
358-
rpc ValidateStorageConfig(ValidateStorage.Request) returns (ValidateStorage.Response);
359-
// ConfigureStorage configures the storage, such as S3 connection in the context of already configured provider
360-
rpc ConfigureStorage(ConfigureStorage.Request) returns (ConfigureStorage.Response);
361-
362-
rpc ReadState(ReadState.Request) returns (stream ReadState.ResponseChunk);
363-
rpc WriteState(stream WriteState.RequestChunk) returns (stream WriteState.Response);
364-
365-
rpc LockState(LockState.Request) returns (LockState.Response);
366-
rpc UnlockState(UnlockState.Request) returns (UnlockState.Response);
367-
rpc GetStates(GetStates.Request) returns (GetStates.Response);
368-
rpc DeleteState(DeleteState.Request) returns (DeleteState.Response);
369-
370357
//////// Graceful Shutdown
371358
rpc Stop(Stop.Request) returns (Stop.Response);
372359
}
@@ -826,95 +813,3 @@ message CallFunction {
826813
FunctionError error = 2;
827814
}
828815
}
829-
830-
831-
message ValidateStorage {
832-
message Request {
833-
string type_name = 1;
834-
DynamicValue config = 2;
835-
}
836-
message Response {
837-
repeated Diagnostic diagnostics = 1;
838-
}
839-
}
840-
841-
message ConfigureStorage {
842-
message Request {
843-
string type_name = 1;
844-
DynamicValue prepared_config = 2;
845-
}
846-
message Response {
847-
repeated Diagnostic diagnostics = 1;
848-
}
849-
}
850-
851-
message ReadState {
852-
message Request {
853-
string type_name = 1;
854-
string state_id = 2;
855-
}
856-
message ResponseChunk {
857-
bytes data = 1;
858-
// supplied with the first chunk
859-
optional StateMeta meta = 2;
860-
}
861-
}
862-
863-
message WriteState {
864-
message RequestChunk {
865-
bytes data = 1;
866-
string state_id = 2;
867-
// supplied with the first chunk
868-
optional StateMeta meta = 3;
869-
}
870-
message Response {
871-
repeated Diagnostic diagnostics = 1;
872-
}
873-
}
874-
875-
message StateMeta {
876-
bytes checksum = 1;
877-
int64 number_of_chunks = 2;
878-
}
879-
880-
message LockState {
881-
message Request {
882-
string type_name = 1;
883-
string state_id = 2;
884-
string operation = 3;
885-
}
886-
message Response {
887-
string id = 1;
888-
repeated Diagnostic diagnostics = 2;
889-
}
890-
}
891-
892-
message UnlockState {
893-
message Request {
894-
string type_name = 1;
895-
string state_id = 2;
896-
string lock_id = 3;
897-
}
898-
message Response {
899-
repeated Diagnostic diagnostics = 1;
900-
}
901-
}
902-
903-
message GetStates {
904-
message Request {
905-
string type_name = 1;
906-
}
907-
message Response {
908-
repeated string state_id = 1;
909-
}
910-
}
911-
912-
message DeleteState {
913-
message Request {
914-
string type_name = 1;
915-
string state_id = 2;
916-
}
917-
message Response {
918-
repeated Diagnostic diagnostics = 1;
919-
}
920-
}

internal/grpcwrap/provider.go

-40
Original file line numberDiff line numberDiff line change
@@ -743,46 +743,6 @@ func (p *provider) UpgradeResourceIdentity(_ context.Context, req *tfplugin5.Upg
743743
return resp, nil
744744
}
745745

746-
func (p *provider) ValidateStorageConfig(ctx context.Context, req *tfplugin5.ValidateStorage_Request) (*tfplugin5.ValidateStorage_Response, error) {
747-
// TODO
748-
return nil, nil
749-
}
750-
751-
func (p *provider) ConfigureStorage(ctx context.Context, req *tfplugin5.ConfigureStorage_Request) (*tfplugin5.ConfigureStorage_Response, error) {
752-
// TODO
753-
return nil, nil
754-
}
755-
756-
func (p *provider) ReadState(req *tfplugin5.ReadState_Request, srv tfplugin5.Provider_ReadStateServer) error {
757-
// TODO
758-
return nil
759-
}
760-
761-
func (p *provider) WriteState(srv tfplugin5.Provider_WriteStateServer) error {
762-
// TODO
763-
return nil
764-
}
765-
766-
func (p *provider) LockState(ctx context.Context, req *tfplugin5.LockState_Request) (*tfplugin5.LockState_Response, error) {
767-
// TODO
768-
return nil, nil
769-
}
770-
771-
func (p *provider) UnlockState(ctx context.Context, req *tfplugin5.UnlockState_Request) (*tfplugin5.UnlockState_Response, error) {
772-
// TODO
773-
return nil, nil
774-
}
775-
776-
func (p *provider) GetStates(ctx context.Context, req *tfplugin5.GetStates_Request) (*tfplugin5.GetStates_Response, error) {
777-
// TODO
778-
return nil, nil
779-
}
780-
781-
func (p *provider) DeleteState(ctx context.Context, req *tfplugin5.DeleteState_Request) (*tfplugin5.DeleteState_Response, error) {
782-
// TODO
783-
return nil, nil
784-
}
785-
786746
func (p *provider) Stop(context.Context, *tfplugin5.Stop_Request) (*tfplugin5.Stop_Response, error) {
787747
resp := &tfplugin5.Stop_Response{}
788748
err := p.provider.Stop()

internal/plugin/mock_proto/mock.go

-160
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)