156 return err
157 }
158 b, err := json.Marshal(server.EncryptionRequest{
159 Stage: pointer.StringPtr(secretsencrypt.EncryptionPrepare),160 Force: cmds.ServerConfig.EncryptForce,
161 })
162 if err != nil {
178 return err
179 }
180 b, err := json.Marshal(server.EncryptionRequest{
181 Stage: pointer.StringPtr(secretsencrypt.EncryptionRotate),182 Force: cmds.ServerConfig.EncryptForce,
183 })
184 if err != nil {
201 return err
202 }
203 b, err := json.Marshal(server.EncryptionRequest{
204 Stage: pointer.StringPtr(secretsencrypt.EncryptionReencryptActive),205 Force: cmds.ServerConfig.EncryptForce,
206 Skip: cmds.ServerConfig.EncryptSkip,
207 })
21 return nil, err
22 }
23
24 conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithTimeout(3*time.Second), grpc.WithContextDialer(dialer), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))25 if err != nil {
26 return nil, err
27 }
10 "compress/gzip"
11 "fmt"
12 "io"
13 "io/ioutil" 14 "os"
15 "path/filepath"
16 "strings"
Sometimes a function, variable, constant, field, or whole package becomes redundant or unnecessary but must be kept for compatibility with existing programs. These should not be used except for compatibility with legacy systems.